Spread & Rest in JavaScript

The spread operator allows for an Object's properties to be filled into a another object right in line with existing properties. Likewise, this can fill one array in another array keeping the values in line with existing values. Spread const aNewObject = {...oldObject} const aNewArray = [...oldArray] Rest The rest parameter an array made  MORE q

By on April 18th, 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

Conditional Statements

Conditional Statements test a claim and then either run a block of code or pass to the next step. Ultimately, these statements provide dynamic programmed responses where data can be set programmatically or change, like in the case of user input, and the JavaScript code can respond in different programmed ways. Conditional Statements: if - When a condition is met, run a block of code. else - When a condition is not met in an if statement, run a different bloc   MORE q

By on March 22nd, 2020 in

Every Method in JavaScript

There are a large number of methods that JavaScript includes as part of the various Objects that are built automatically. The previous article, JS Methods, gave an introduction to methods and detailed some of the more commonly used. There are many more, of course. Every JavaScript method is listed here. This is sorted by object so we can see what is available when working with any specific one. These objects will usually inherit methods that will work on the object, but, are not exclusive. In the list below, these inherited methods can be toggled on or off. When toggled off, the inherited methods will be  MORE q

By on March 19th, 2020 in

Methods in JavaScript

A method is a ultimately the same as a function in that it is a block of code that performs an action. The difference between a method and a function is that a method is a property of an object. that performs actions on that object. Invoking a function and calling a method are a little different. For a function, you only need the function name and parenthesis. For a method, we need to identify where the method is located first,  MORE q

By on March 7th, 2020 in

Functions in JavaScript

Functions are pieces of code that perform actions. There are both functions built into JavaScript and an almost limitless number of functions a developer can create. The Anatomy of a Function Function can be created using the function keyword, usually followed by a unique name, though a name is not required, followed by () and then { } Inside of the (), you can set perimeters. These perimeters ore optional, but, if used, allow for data to be transferred in to the function to be used. Functions usually end with the keyword return. This keyword signals the JavaScript engine to stop processing the function and will take  MORE q

By on March 3rd, 2020 in