Skip to content

Instantly share code, notes, and snippets.

View Elijah-trillionz's full-sized avatar
💭
hacking

Elijah Trillionz Elijah-trillionz

💭
hacking
View GitHub Profile
@Elijah-trillionz
Elijah-trillionz / cookie.js
Last active May 22, 2021 13:54
Get Data From Cookies with one function
@Elijah-trillionz
Elijah-trillionz / spreadArray.js
Last active July 1, 2021 09:16
Spread Operators with Arrays
// spread operators allows any iterable to be expanded
// it can serve as a means of adding arrays (concatenation)
const arr1 = [1, 3, 4]
const arr2 = [10, 13, 5]
const bothArr = [...arr1, ...arr2]
// you can use this to update an array with
// another array without leading to a multidimensional array
let arr1 = [1, 3, 4]
const arr2 = [10, 13, 5]