I am trying to trim the string. I google it for trim.
The tips i am getting.
- name.trim(); -- Not recognized trim() function
npm install --save string
var S = require('string'); S('hello ').trim().s; -- this also same issue
Can you any one assist me what is the problem of the above method or anything i have missed it?
name.trim()should work ifnameis a string.typeof name?