Answers for "substring ultimos 4 caracteres javascript"

PHP
5

substr() javascript

const str = 'substr';

console.log(str.substr(1, 2)); // (1, 2): ub
console.log(str.substr(1)); // (1): ubstr

/* Percorrendo de trás para frente */
console.log(str.substr(-3, 2)); // (-3, 2): st
console.log(str.substr(-3)); // (-3): str
Posted by: Guest on September-18-2020

Code answers related to "substring ultimos 4 caracteres javascript"

Browse Popular Code Answers by Language