Answers for "javascript string pop first charactor"

2

remove first 3 characters from string javascript

var string = "abcd";
console.log(string.substring(3)); //"d"
Posted by: Guest on December-13-2019
0

js remove first character from string

// Return a word without the first character
function newWord(str) {
	return str.replace(str[0],"");
	// or: return str.slice(1);
	// or: return str.substring(1);
}

console.log(newWord("apple"));	// "pple"   
console.log(newWord("cherry"));	// "herry"
Posted by: Guest on March-12-2021

Code answers related to "javascript string pop first charactor"

Code answers related to "Javascript"

Browse Popular Code Answers by Language