cut off string at certain spot js code example
Example 1: remove character at index from string javascript
// removing char at index 3
var str = "Hello World";
str = str.slice(0, 3) + str.slice(4);
console.log(str) // Helo World
Example 2: reactjs cut part of string
var str = "Hello world!";
var res = str.substring(1, 4);
// res value is "ell"