Can I convert a string representing a boolean value (e.g., 'true', 'false') into a intrinsic type in JavaScript?
I have a hidden form in HTML that is updated based upon a user's ...
I got the json "false" from server. i respond as bool but it's json so it's in browser have type string instead of bool.
so if i run (!data) // whenever i ...
I need to a way to wrap a boolean value such that comparisons are not broken and the string result is different than 'false' or 'true' without altering the global boolean ...
I am actually doing that solution now. But it felt somehow cheap compared to what Java offers. It is a pity that the Boolean wrapper object doesn't work like it does in Java. But hey, I know, JavaScript is not Java. I wish it would be more like Java and less like Python, which it is becoming lately (JavaScript 1.7 and ...