Logical operators are very important when it comes to coding, the results are based off whether the value is truthy or falsy.
(&&) AND Logical Operator
The && operator returns true if both expressions are true, otherwise the result will return false.
When using the ! operator you must be in front of a value and the value will convert to a boolean and return an opposite value. Which means truthy values will return false, and falsy values will return true.
The or logical operator is used with two or more values but it evaluates true if any of the values are true. Which means if both values are false the return value will be falsy.
Array Iteration Methods
Iteration is the most common use of operations when it comes to programming. Loops help us iterate through an array repeatedly, quick and easy.
Array methods are properly written out as
Array.prototyperefers to the
Array object itself. For simplicity, we will simply list the name as
The forEach() method executes a provided function once for each array element.
The .map() method creates a new array with the results of calling a provided function on every element.The map method does not change the original array.
The filter() method creates a new array with all elements that pass the test implemented by the provided function.
The reduce method runs a function on each array element to produce a single value. The reduce method works from left- to-right in the array.
The parent stem is the root html and the child branches are the nested elements, and the leaves are the content with the elements.
The window object is the top, it is the outmost element of the object. The document object is the HTML document that contains the contents of the page. The form object contains the <form> tags set for the form object. Then the form object contains all the elements defined for that object such as text fields, buttons and checkboxes.The DOM element are DIV, HTML, BODY on the web page.
Locating DOM elements using selectors but can only be used on HTML elements.