You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
384 B

/* FIXME: missing a lot of coercion tests */
/*===
true
false
true
false
true
false
===*/
print(true)
print(!true);
print(!!true);
print(false);
print(!false);
print(!!false);
/*===
false
true
true
false
false
true
===*/
print(!{}); // ToBoolean({}) -> true
print(!!{});
print(!''); // ToBoolean('') -> false
print(!!'');
print(!'a'); // ToBoolean('a') -> true
print(!!'a');