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
 
PREVIOUS NEXT
Tagged: #How #logical #operators #works
ADD COMMENT
Topic
Name
8+1 =