test
Psalm Picker
Check the console for an eyeful. And remember that .val()
turns almost everything into a string. BTW, the following paragraph is p#test
:
true
console.log(false + ' - ' + typeof false); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val(true); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val('true'); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val(false); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val('false'); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val(1); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val('1'); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val(0); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val('0'); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); $('p#test').val(''); console.log($('p#test').val() + ' - ' + typeof $('p#test').val()); if($('p#test').val() != true){ console.log("The hidden button is not ticked.\nSo, the middle tabs should be visible."); }else{ console.log("The hidden button is ticked.\nSo, the middle tabs should not be visible."); } if('false' == false){ console.log('The world exploded: "false" == false.') } if('true' == true){ console.log('The world exploded: "true" == true.') } if(!!'true'){ console.log('!!\'true\' is Truthy.') } if('true'){ console.log('\'true\' is Truthy.') }