JS parseBool()
On 6 November 2014 in TechThis function cast any variable into type ‘boolean’
function parseBool(value) { return !!value; } console.log(typeof parseBool({})); // “boolean"
Related posts:
-
Indirect code execution flow
-
Webview evalJS return null in Android 4.2.2
-
Creating [object] in a different context than the calling function.
-
Lazyloading JS modules in Titanium app
-
Titanium app hex color value with alpha channel
-
Titanium app components interaction using events and callbacks
-
Object oriented Javascript with CommonJS in Titanium app
Filed under Tech with tags Javascript
Leave a Reply