This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let liked = 0; | |
| setInterval(() => { | |
| let heart = document.getElementsByClassName('glyphsSpriteHeart__outline__24__grey_9'), | |
| arrow = document.querySelector('.coreSpriteRightPaginationArrow'); | |
| if (heart[1]) { | |
| heart = heart[1].parentElement; | |
| likesd++, heart.click(); | |
| } | |
| arrow.click(); | |
| console.log(`You've liked ${likesd} post(s)!`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let firstArray = [1,2,3,'Shinchan'] | |
| let secondArray = ['Nohara',4,5,6] | |
| let combinedArray1 = firstArray.concat(secondArray) | |
| let combinedArray2 = secondArray.concat(firstArray) | |
| console.log(`Combined Array1 = `+combinedArray1) | |
| // Combined Array1 = 1,2,3,Shinchan,Nohara,4,5,6 | |
| console.log(`Combined Array2 = `+combinedArray2) | |
| //Combined Array2= Nohara,4,5,6,1,2,3,Shinchan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let firstArray = [1, 2, 3, 'Shinchan'] | |
| let secondArray = ['Nohara', 4, 5, 6] | |
| let thirdArray = [7, 8, 9, 'Himawari'] | |
| let combinedArray1 = [...firstArray, ...secondArray, ...thirdArray] | |
| let combinedArray2 = [...secondArray, ...firstArray, ...thirdArray] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let firstArray = [1, 2, 3, 'Shinchan'] | |
| let secondArray = ['Nohara', 4, 5, 6] | |
| let thirdArray = [7, 8, 9, 'Himawari'] | |
| let combinedArray = [] | |
| combinedArray.push(...firstArray, ...secondArray, ...thirdArray) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let firstArray = [1, 2, 3, 'Shinchan'] | |
| let secondArray = ['Nohara', 4, 5, 6] | |
| let thirdArray = [7, 8, 9, 'Himawari'] | |
| let combinedArray = [] | |
| combinedArray.push( firstArray, secondArray, thirdArray) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const array1=[1,2,3,'My','Name','is','Ney'] | |
| const string1=array1.join() | |
| const string2=array1.join('') | |
| const string3=array1.join(',') | |
| const string4=array1.join('and') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const num = [1,2,3,4,5,6] | |
| const reverseNum = num.reverse() | |
| console.log(reverseNum) //[ 6, 5, 4, 3, 2, 1 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let greekLetter = ['beta','alpha','delta','gamma']; | |
| console.log(greekLetter.sort()) // [ 'alpha', 'beta', 'delta', 'gamma' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let num1 = [25, 100, 23] | |
| console.log(num1.sort()) //[ 100, 23, 25 ] | |
| let num2 = ['25', '100', '23'] | |
| console.log(num2.sort()) //[ '100', '23', '25' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let num = [25, 100, 23] | |
| console.log(num.sort((a, b) => { | |
| return a - b | |
| })) | |
| //[ 23, 25, 100 ] |
OlderNewer