Answers for "Substring verwenden"

0

Substring verwenden

var anyString = 'Mozilla';

// Zeigt 'Moz'
console.log(anyString.substring(0, 3));
console.log(anyString.substring(3, 0));

// Zeigt 'lla'
console.log(anyString.substring(4, 7));
console.log(anyString.substring(7, 4));

// Zeigt 'Mozill'
console.log(anyString.substring(0, 6));

// Zeigt 'Mozilla'
console.log(anyString.substring(0, 7));
console.log(anyString.substring(0, 10));
Posted by: Guest on October-15-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language