/js-jonas

Primary LanguageJavaScript

js_jonas

  1. Logical OR (||)

expr1 || expr2

If expr1 can be converted to true, returns expr1; else, returns expr2.

example:-

var a = 0 || 5

console.log(a)  // 5