Arrays
Created by Codedamn about a year ago
No description provided
9 Comments
Thanks
Const mehulMohan = ['B','e','s','t',' ','T','e','a','c','h','e','r']; Const codeDamn = mehulMohan.map((x) => { return; });
console.log(codeDamn);
Can You Provide a CheatSheet for the functions it will be a great help as some functions are a bit confusing to use
Why the output is giving in separate new lines? code: let myFriends = [];
function addtoList(friends) { myFriends.unshift(friends) console.log(myFriends); }
addtoList('KT'); addtoList('BT'); addtoList('DT', 'CT');
4.83k views till 22-12-22
how do we run the code in my playground?
Unshift -> to first, push -> to Last, pop-> removes the last value it also returns the value, [] index can change the value.
Hey what did he meant by knowing of index in the last part??
you made me more confused