metal5
07-25-2004, 03:17 AM
I'm reading on javascript building. What does the double ampersands mean in methods?
For example:
if(navigator.plugins && navigator.plugins.length>0) {
document.write("You have the following plugins:.....
I read that both values on each side of the double ampersands have to be true for the code to work, but is this true---
navigator.plugins && navigator.plugins.length? I wouldn't think so. In order for this to be 'true' wouldn't the it have to be navigator.plugins && navigator.plugins. The book I'm reading is an excellent book but I'm stumped on how it barely explains the purpose of the double ampersand.
Any suggestions appreciated.
metal5:eek: :eek:
For example:
if(navigator.plugins && navigator.plugins.length>0) {
document.write("You have the following plugins:.....
I read that both values on each side of the double ampersands have to be true for the code to work, but is this true---
navigator.plugins && navigator.plugins.length? I wouldn't think so. In order for this to be 'true' wouldn't the it have to be navigator.plugins && navigator.plugins. The book I'm reading is an excellent book but I'm stumped on how it barely explains the purpose of the double ampersand.
Any suggestions appreciated.
metal5:eek: :eek: