How can I check if a variable\'s type is of type Boolean?
I mean, there are some alternatives such as:
if(jQuery.type(new Boolean()) === jQuery.type(
val === false || val === true.typeof variable == typeof true.The shortest, but not readable at all: !!val === val.
Explanation:
Tests: