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

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

Comparisons in JavaScript

JavaScript has many ways to compare data. There are both strict and pliant comparisons avaialable Strict comparisons require the type of the data as well as the values be identical. For this, a number can only match a number and they must have the same value, a string only matches another string with the same value, etc. The more pliant comparisons check for a match to the data value, and does not care about the  MORE q

By on March 27th, 2020 in

Error Handling & Debugging

JavaScript is decently equipped to get a handle on errors that may arise. The first tool we should know is the Error Object. const myError = new Error('Oh No!'); throw myError.name + myError.message + myError.stack; Built-in Error Objects are numerous. A complete  MORE q

By on March 27th, 2020 in

JavaScript Terms to Know | Basic & Advanced

Basic JS Terms Attribute An attribute is a piece of information that controls access to a property More detail→ Conditional A conditional statement will be some variation of an if-then statement. These statements allow an application to test whether a particular condition is true and then take different action for a return of true or…  MORE q

By on March 27th, 2020 in

Post Navigation