Javascript String replaceNbsp()
//Write a function that replaces non breaking white-spaces in a text with var text = 'Write a function that replaces non breaking  white-spaces in a text with .'; String.prototype.replaceNbsp = function () { return this.replace(/ /g, ' '); } console.log(text.replaceNbsp());/*from w w w. j a v a 2s .c om*/