JAVASCRIPT

Map Usage in Javascript

Essential Map Methods Method Description new Map() Creates a new Map set() Sets the value for a key …

Switch Usage in …

Use the switch statement to select one of many code blocks to be executed. Example 1 1// Find the …

If Else Usage in …

NOTE a == b # Equals a != b # Not Equals a > b # Greater than a < b # Less than a >= b # …

Foreach Loop Usage in …

1 const numbers = [3, 6, 12, 24, 48, 63]; 2 let text = ""; 3 4 numbers.forEach((value, …

While Loop Usage in …

1let i = 2; 2while (i < 10) { 3 text += "The number is " + i; 4 i++; 5} 6 7const cars = …

For In Loop Usage in …

1// The for in statement loops through the properties of an Object 2for (key in object) { 3 // code …

How to Find Array Length …

1// usage: 2let len = array.length; 3 4const foods = ["Spagetti", "Smoked Steak", …

For Loop Usage in …

1// The for statement creates a loop with 3 optional expressions: 2for (expression 1; expression 2; …