This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Spread & Rest Operators | |
/* | |
Spread: Used to split up arrow elements OR object properties. | |
const nnewarray = [...oldArray, 1,2] | |
const newObject = {...oldObject, newProp:5} | |
Rest: Used to merge a lost of functions argumnets into array. | |
function sortArray(...arg){ | |
return args.sort() | |
} | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Data Types: | |
Undefined, null, booleans, String, Symbols, number, and objects; | |
*/ | |
/* | |
Symbols: Symbols are immutable and are unique | |
*/ | |
const val1 = Symbol("Hello") | |
const val2 = Symbol("Hello") | |
console.log(val1 == val2) //false |