when typing in the input input box, there can be no spaces at the beginning and end, but there can be spaces in the middle of the text
.
is there any regular or other way to implement this?
when typing in the input input box, there can be no spaces at the beginning and end, but there can be spaces in the middle of the text
.
is there any regular or other way to implement this?
var greeting = 'Hello World!';
console.log (greeting);
/ / expected output: "Hello World!";
console.log (greeting.trim ());
/ / expected output: "Hello World!";