IgniteEngine-iOS icon indicating copy to clipboard operation
IgniteEngine-iOS copied to clipboard

Javascript should have a means of automatically wrapping quotes around a variable

Open brandonscript opened this issue 10 years ago • 0 comments

Currently this doesn't work:

{{ var foo=[]; foo.push([[$self.text]]); JSON.stringify(foo); }}

But this does:

{{ var foo=[]; foo.push('[[$self.text]]'); JSON.stringify(foo); }} 

(with quotes around the variable). Can we figure out a way of dynamically adding quotes around variables if the variable is not a bool, int or float?

brandonscript avatar Mar 20 '15 23:03 brandonscript