Arrays in Javascript

Arrays in JavaScript are versatile structures for storing various data types, indexed from zero. They allow for creation through methods or literal expressions and support numerous properties and methods for manipulation and data retrieval. Common operations include adding, removing, and accessing elements, as well as merging arrays without altering originals.  MORE q

By on April 11th, 2020 in

Variables in JavaScript

Variables in JavaScript are basically names or references to storage locations in memory. A variable name needs to start with a letter (lowercase is most common, though uppercase can be used), an underscore( _ ) or dollar sign( $ ). Variables will be either local, which means they are only accessible within a function or brackets, or global, which means they are accessible anywhere. Variable Declarations var - scoped globally. const - block scoped by curly brackets {} and unchangeable. let - block scoped and changeable. The last option is  MORE q

By on April 10th, 2020 in

Global Event Handlers

ONE OBJECT TO RULE THEM ALL! OK, perhaps not "rule" them all, but certainly there is one object that makes it possible for near-total control of a web app. The Global Event Handlers Web API provides a globally-scoped object containing an assortment of event data from the document, Window or an HTML element. This can be user-interaction events, like clicking a button or moving to a different element, or programmatic changes, like a CSS animation that runs on page load. Notice of these events, as well as a large variety of important   MORE q

By on April 3rd, 2020 in

Events in JavaScript

While Global Event Handlers are actually a Web API, accessing these events are central to Javascript's usefulness. These events mark points of interaction from the user or programmatic changes to the document. All of this can be harnessed via JavaScript to provide both functional and visual manipulations that create a   MORE q

By on April 3rd, 2020 in

JS Shortcuts

Here I look at the use of compound assignment operators, allowing concise math operations. It provides examples, such as x += y, which simplifies expressions. Additionally, it introduces the modulus operator for finding remainders and checking even or odd numbers. Post-increment and pre-increment operators are also described for variable evaluation timing.  MORE q

By on April 3rd, 2020 in

Objects in JavaScript

Objects are the center of JS programming. Methods and Properties can be attached. Objects are lists or collections of properties For each property, Objects always have a name that is a STRING and a value that can be a STRING, NUMBER or FUNCTION Under the hood: When creating an object or adding a property, the JS engine invokes the [put] method to assign a place in memory. When changing a property, the JS engines invokes the [set] method for changing the  MORE q

By on March 31st, 2020 in

JS Types

JavaScript has several built-in data types: String (text), Number (numeric values), Boolean (true/false), null (intentional absence), undefined (no value assigned), and Symbol (unique identifiers). Each type has specific behaviors and uses. For instance, Boolean evaluates conditions, while Symbol prevents property conflicts in objects.  MORE q

By on March 30th, 2020 in

How JavaScript Works

The JavaScript runtime environment consists of the JavaScript engine, Web APIs, Job Queue, Callback Queue, and Event Loop. The engine includes the Memory Heap and Call Stack, which processes code synchronously. Asynchronous operations are managed by the Event Loop, which handles tasks from Job and Callback Queues, ensuring efficient execution.  MORE q

By on March 30th, 2020 in

Post Navigation