Lets say that we have a String with the value "false" or "true". Lets now cast this String to a boolean value. In Java it would be
Code Java:
Boolean fun = new Boolean("true");

JavaScript also provides a Boolean Wrapper object, but it doesn't really give the expected results
Code JavaScript:
var notFun = Boolean("false"); // omitting new, see [url]http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean[/url]
// notFun = true

The above will only be false if false, NaN, null, 0 or an empty String is provided, everything else will return true.

So the only way to cast a String with the values "true" or "false" is to use eval...
Code JavaScript:
var snowing = eval("false");

Anybody has another way to do the cast?