Created
April 30, 2018 22:36
-
-
Save alexko30/b578c424742f40c3dd5e8fbf1b40a0d8 to your computer and use it in GitHub Desktop.
remove First And Second Character From String
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
function removeFirstAndSecondCharacter(str) { | |
const strArray = str.split(''); | |
const firstStarrPoint = 0; | |
strArray.splice(firstStarrPoint, 1); | |
strArray.pop(); | |
let strNew = strArray.toString().replace(/,/g, ''); | |
console.log(strNew); | |
} | |
removeFirstAndSecondCharacter('2Hello1'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment