site:stackoverflow.com javascript replace multiple spaces with single space
var multiSpacesString="I have some big spaces.";
var singleSpacesString=multiSpacesString.replace(/ +/g, ' ');//"I have some big spaces."
Also in JavaScript:
- how can i convert object to an array javascript
- node command get to much time
- print object javascript
- discord.js start code
- oauth2 spring boot react google example
- angular emit output
- text editor
- check if form bootstrap is valid js
- chartjs how to disable hover lable
- Bidirectionnal model binding
- javascript array push
- javascript round up
- archiver compressed file in nodejs
- js how to add element in object
- what does conservatism really mean
- how to Write a program that simulates a coin toss using random method of Javascript Math class
- random int from interval javascript
- how to get the id of button clicked in jquery
- javascript keyboard events
- vue timeout
- tree traversal recursion in javascript
- calculator
- scroll jquery to anchor
- javascript get all elements with class