Answers for "substr method"

13

substring

const str = 'Mozilla';

console.log(str.substring(1, 3));
// expected output: "oz"

console.log(str.substring(2));
// expected output: "zilla"
Posted by: Guest on February-06-2020
5

javascript substring

// zero-based index, 'end' is excluded from result
myString.substring( start, end )
Posted by: Guest on December-04-2020
2

Substring

str.substr(start[, length])
Posted by: Guest on February-11-2021
0

substring

var str = "The MEAN stack is MongoDB, Express.js, AngularJS, and Node.js";
str.indexOf('MongoDB') !== -1 // true
str.indexOf('Java') !== -1 //false
str.indexOf('Node', 5) !== -1 //true
Posted by: Guest on September-04-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language