Toggle navigation
Genres
Frontend (2)
JavaScript (6)
Database (2)
Linux Server (3)
Web Apps (4)
Misc (4)
Search
List
New Tutorials
Last Modified Tutorials
</>
Code examples
code
smiko
javascript
basic
044bool_not_exe_function.js
044bool_not_exe_function.js
/** * Following examples will never execute function */ function fja(str) { console.log('Fja is executed beacuse of: '+str); return true; } //fja() is executed if(true && fja('true &&')) var x=5; //fja() is not executed because of false && if(false && fja('false &&')) var x=5; ///////////////// //fja() is executed if(false || fja('false ||')) var x=5; //fja() is not executed because of true || if(true || fja('true ||')) var x=5;
Reload page
Preview
W3C validation
Edit Code
JS Console