Basically, JavaScript use short-circuit evaluation technique for logical operators like && and ||. But, it returns the last value which will halt the execution.
I hope this will help.
Want to become a Java Expert? Join Java Training now!!
Want to know more about Java? Watch this video on Java Course | Java Tutorial for Beginners: