#!/usr/bin/js tell_me_the_truth = function(s){ var p; eval('p = ' + s); if (p){ print('\'' + s + '\' (' + p + ')' + ' is TRUE.'); } else{ print('\'' + s + '\' (' + p + ')' + ' is FALSE.'); } }; tell_me_the_truth('true'); tell_me_the_truth('false'); tell_me_the_truth('0'); tell_me_the_truth('1'); tell_me_the_truth('0.0'); tell_me_the_truth('NaN'); tell_me_the_truth('NaN === NaN'); tell_me_the_truth('isNaN(NaN)'); tell_me_the_truth('Infinity'); tell_me_the_truth('Infinity - 1'); tell_me_the_truth('Infinity - Infinity'); tell_me_the_truth('"0"'); tell_me_the_truth('"0.0"'); tell_me_the_truth('""'); tell_me_the_truth('[]'); tell_me_the_truth('{}'); tell_me_the_truth('null'); tell_me_the_truth('undefined'); tell_me_the_truth('!!undefined'); tell_me_the_truth('!!1');