I'm trying to get rid of spaces in a string, but it seems not to be working. This doesn't return the string without spaces:
"{ color: 'blue',".replace(" ",'')
and "{ color: 'blue',".trim()
I've verified that those are spaces (char code 32), and I've even done this:
var x = "{ color: 'blue',"
x.replace(x[1],'')
FYI, doing this in chrome's console. Am I going crazy?