Answers for "how to convert truncate first character of a string in JAVASCRIPT"

9

javascript remove first character from string

let str = " hello";
str = str.substring(1);
Posted by: Guest on October-03-2020
0

delate char betwen index js

// First find the substring of the string to replace, then replace the first occurrence of that string with the empty string.

S = S.replace(S.substring(bindex, eindex), "");

//Another way is to convert the string to an array, splice out the unwanted part and convert to string again.

var result = S.split("");
result.splice(bindex, eindex - bindex);
S = result.join("");
Posted by: Guest on June-19-2020

Code answers related to "how to convert truncate first character of a string in JAVASCRIPT"

Code answers related to "Javascript"

Browse Popular Code Answers by Language