Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How does logical operators or || works in javascript?

const num = 6;
if (num <= 4 || num <= 8) {
    console.log('true')
} else {
    console.log('false')
}
//Expected output:true
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #How #logical #operators #works
ADD COMMENT
Topic
Name
7+3 =