Hi everyone, I am relatively new to JS and I am hoping someone could
tell me what this line of codes mean. This was written by some
brilliant guys at webfx and I am trying to understand some of their
codes.
To begin with I don't understand how this variable is set.
var sliderE1=docume nt.getElementBy ID?
document.getEle mentById("slide r-1"): null;
Question 1: What is the function of the "?" mark after the
document.getEle mentByID
Question 2: What is the reason for including ": null"
and Question 3: Can't this be done just by simply using
"document.getEl ementById("slid er-1")"?
Thanks in advance.
tell me what this line of codes mean. This was written by some
brilliant guys at webfx and I am trying to understand some of their
codes.
To begin with I don't understand how this variable is set.
var sliderE1=docume nt.getElementBy ID?
document.getEle mentById("slide r-1"): null;
Question 1: What is the function of the "?" mark after the
document.getEle mentByID
Question 2: What is the reason for including ": null"
and Question 3: Can't this be done just by simply using
"document.getEl ementById("slid er-1")"?
Thanks in advance.
Comment