Added quotation mark for Trump in the example just in case you haven't seen the typo. [
firstPerson,secondPerson,...theRest] = ["Ayobami", "Bush", "Obama", "Trump"];
console.log(firstPerson) // Ayobami
console.log(secondPerson)// Bush
console.log(theRest) // ["Obama", "Trump"]
I am a software developer that loves to research, learn and unlearn to solve human and business problems. I write PHP(Laravel), JavaScript(React), I contributed to Firefox Debugger and tutor @udemy.
Added quotation mark for Trump in the example just in case you haven't seen the typo. [
firstPerson,secondPerson,...theRest] = ["Ayobami", "Bush", "Obama", "Trump"];
console.log(firstPerson) // Ayobami
console.log(secondPerson)// Bush
console.log(theRest) // ["Obama", "Trump"]
Wow! Thanks for spotting the typo. I just fixed it.