Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mdn trimstart

const greeting = '   Hello world!   ';
console.log(greeting);
// expected output: "   Hello world!   ";
console.log(greeting.trimStart());
// expected output: "Hello world!   ";
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #mdn #trimstart
ADD COMMENT
Topic
Name
5+4 =