This file contains 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
1) Reverse a String: | |
// Reverses a given string | |
function reverseString(str) { | |
return str.split('').reverse().join(''); | |
} | |
2) Working with Arrays: | |
const myArray = [1, 2, 3]; |