Monthly Archives: February 2022

PRIMITIVE VALUES AND JAVASCRIPT OBJECTS

PRIMITIVE VALUES AND OBJECTS In javascript there are several types of values that are divided into primitives and objects. Definition: An object is a data structure that allows the storage of a set of information. We will look at primitive data one by one. Let's go to Visual Studio Code. JAVASCRIPT OBJECTS NB: This is only an overview. We will delve into the discussion of javascript objects in later posts. In JavaScript there are eight types of data. Seven of them are called "primitives" because their values always contain a single element [...]

By |2024-11-11T18:19:25+00:00February 13, 2022|0 Comments

JAVASCRIPT STRINGS

STRINGS IN JAVASCRIPT A string in javascript is an unsigned 16-bit immutable sequence of elements. Each element in most cases represents a Unicode character. This rule does not always apply, I give an example of code where in the case of an emoji you need two bytes. ES2015 introduced literal templates. We can define a string through the backtick character. To define the backtick we use: Alt Gr + on Linux Alt+96 on Windows Alt +9 on Mac Strings are used to store and manipulate text. A string consists of zero or more characters [...]

By |2024-11-11T18:20:40+00:00February 20, 2022|0 Comments

JAVASCRIPT FUNCTIONS

JAVASCRIPT FUNCTIONS In the development of complex Web sites and software in general, a key aspect is the organization of the code. Suppose we have an application consisting of ten thousand lines of unstructured code written one after the other. Such a code in the case works would be impossible to manage and maintain, extend and modify. Through javascript functions we can break the code into separate blocks, each of which performs a certain function. These code blocks we can call (invoke) whenever we need them. Functions are defined in such a way that they can receive input data [...]

By |2024-11-11T18:22:30+00:00February 10, 2022|0 Comments

JAVASCRIPT EVENTS

EVENTS IN JAVASCRIPT HTML events are "things" that happen to HTML elements. When JavaScript is used in HTML pages, it can "react" to these events. EVENTS HTML An HTML event can be something the browser does or something a user does. Here are some examples of HTML events: An HTML web page has finished loading An HTML input field has been changed An HTML button was clicked Often, when events happen, you may want to do something. JavaScript allows you to execute code when events are detected. HTML allows you to add event handler attributes, with JavaScript code, to [...]

By |2024-11-11T18:23:08+00:00February 15, 2022|0 Comments

THE JAVASCRIPT ARRAY

ARRAY IN JAVASCRIPT Through objects, we can store values that are accessed with the corresponding key. However, we often need to store an ordered set of values to do this we use arrays. In Javascript, arrays as well as functions are objects, and since they are adjectives we can add properties. METHODS ON ARRAYS The code below illustrates, as mentioned in the introduction, that arrays are also objects. CONSTRUCTOR FUNCTION ARRAY We see from the figure below that in the prototype of the constructor function Array there are many methods for working with arrays; [...]

By |2024-11-11T18:34:05+00:00February 24, 2022|0 Comments
Go to Top