Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to use trim in node js

const greeting = '   Hello world!   ';

console.log(greeting);
// expected output: "   Hello world!   ";

console.log(greeting.trim());
// expected output: "Hello world!";
 
PREVIOUS NEXT
Tagged: #trim #node #js
ADD COMMENT
Topic
Name
8+3 =