how to trim space in between string in js code example Example: javascript trim spaces value = value.trim();