Created
June 9, 2009 16:54
-
-
Save phiggins42/126642 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test a value for spaces, reduce a value to no spaces. | |
var re = / /g, value = "Some text with spaces"; | |
if(value.test(re)){ | |
var t = value.replace(re,""); | |
console.log(t.length); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment