Arrays in Javascript

An array is a way to organze and store data. Basic Rules for Arrays Arrays will always be enclosed in [ ] and each item within the array is numbered (an index). This numbering starts at 0 and can hold as many items as needed. Any data type can be stored (string, number, boolean, Objects (including functions and other arrays), etc. Arrays can be a mix of numbers and strings, although this is generally not a good idea and there can be a little bit of a performamce hit by doing so. Arrays carry properties (information about  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

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

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

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

Post Navigation