en.javascript.info/1-js/02-first-steps/11-logical-ops/8-if-question/task.md
Ilya Kantor 9ad9063d00 up
2016-11-28 21:35:42 +03:00

268 B

importance: 5


A question about "if"

Which of these alerts are going to execute?

What will be the results of the expressions inside if(...)?

if (-1 || 0) alert( 'first' );
if (-1 && 0) alert( 'second' );
if (null || -1 && 1) alert( 'third' );