Lîm_Gravecryer
06-01-2004, 04:42 PM
im sitll a bit nooby with javascript, and i dont understand what ppl mean when they put somehting like this in a script:
if(document.layers)
i mean: doesnt an >if< have to have 2 parts, to compare?!??
greetz. Lim
the value will either be a true or false statement.
document.layers is a specific browser condition.
if that condition is present, it will hold a true value.
if that condition is not present, it will hold a false value.
the IF statement will then go forward depending on the value.
depending on the script, yes, it may be comparing two conditions, or in this case, only if one is true or not.
Lîm_Gravecryer
06-01-2004, 06:23 PM
in a lot of javascripts you see return true; or return false; what does that do?
exact same concept.
produces a true or false condition to create or negate a command.