Code Fellows Notes
A new array with each element being the result of the callback function.
Using curly braces {}
Key.
Keys help React identify which items have changed, are added, or are removed.
JavaScript, spread syntax refers to the use of an ellipsis of three dots (âĶ) to expand an iterable object into the list of arguments.
const myArray = [ðĪŠ,ðŧ,ð]
const yourArray = [ð,ðĪ,ðĪĐ]
const ourArray = [...myArray,...yourArray]
console.log(...ourArray) // ðĪŠ ðŧ ð ð ðĪ ðĪĐ
const fewFruit = ['ð','ð','ð']
const fewMoreFruit = ['ð', 'ð', ...fewFruit]
console.log(fewMoreFruit) // Array(5) [ "ð", "ð", "ð", "ð", "ð" ]
const objectOne = {hello: "ðĪŠ"}
const objectTwo = {world: "ðŧ"}
const objectThree = {...objectOne, ...objectTwo, laugh: "ð"}
console.log(objectThree) // Object { hello: "ðĪŠ", world: "ðŧ", laugh: "ð" }
const objectFour = {...objectOne, ...objectTwo, laugh: () => {console.log("ð".repeat(5))}}
objectFour.laugh() // ððððð
Create the function wherever the state is that we are going to change.
Takes a variable and increments its value and returns updated value.
this.increment
this.props.increment()