Play this article
//Concat
['๐๐ปโโ๏ธ', '๐๐ป'].concat('๐ง๐ป') = [ '๐๐ปโโ๏ธ', '๐๐ป', '๐ง๐ป' ]
//Join
['๐คด๐ป', '๐ธ๐ป'].join('๐') = '๐คด๐ป๐๐ธ๐ป'
//Slice
['๐ญ', '๐ถ', '๐'].slice(2)= [ '๐' ]
//Index of
['0๏ธโฃ', '1๏ธโฃ', '2๏ธโฃ', '3๏ธโฃ'].indexOf('1๏ธโฃ') = 1
//Includes
['0๏ธโฃ', '1๏ธโฃ', '2๏ธโฃ', '3๏ธโฃ'].includes('1๏ธโฃ') = true
//Every
[
{label: '0๏ธโฃ', type: 'emoji'},
{label: '1๏ธโฃ', type: 'emoji'},
{label: '2๏ธโฃ', type: 'emoji'},
{label: '3๏ธโฃ', type: 'emoji'}
].every(item => item.type === 'emoji') = true
//Some
[0, '1๏ธโฃ', '2๏ธโฃ', '3๏ธโฃ'].some(item => typeof item === 'number') = true
//Fill
['๐', '๐', '๐'].fill('๐คช') = [ '๐คช', '๐คช', '๐คช' ]
// Map
['0๏ธโฃ', '1๏ธโฃ', '2๏ธโฃ', '3๏ธโฃ'].map((item, index) => item + " -> " + index) = [ '0๏ธโฃ -> 0', '1๏ธโฃ -> 1', '2๏ธโฃ -> 2', '3๏ธโฃ -> 3' ]
// Map
['0๏ธโฃ', '1๏ธโฃ', '2๏ธโฃ', '3๏ธโฃ'].filter((item, index) => index === 1) = [ '1๏ธโฃ' ]
//Reduce
['0๏ธโฃ', '1๏ธโฃ', '2๏ธโฃ', '3๏ธโฃ'].reduce((acc, current) => acc + current) = '0๏ธโฃ1๏ธโฃ2๏ธโฃ3๏ธโฃ'
//Push
['๐คฌ', '๐ก', '๐', '๐'].push('๐') = 5 // it will insert '๐' to list at last
//unshift
['๐ก', '๐', '๐', '๐'].unshift('๐คฌ') = 5 // it will insert '๐คฌ' to list at first
//Pop
['๐คฌ', '๐ก', '๐', '๐', '๐'].pop('๐') = '๐' // it will remove '๐' from list
//Shift
['๐คฌ', '๐ก', '๐', '๐', '๐'].shift() = '๐คฌ' // it will remove '๐คฌ' from list
//Reverse
['๐คฌ', '๐ก', '๐', '๐', '๐'].reverse() = [ '๐', '๐', '๐', '๐ก', '๐คฌ' ]
ย