Obtener X caracteres de String JavaScript
const result = 'Hiya how are you'.substring(0,8);
console.log(result);
console.log(result.length);
Run code snippet
code fighter
const result = 'Hiya how are you'.substring(0,8);
console.log(result);
console.log(result.length);
Run code snippet