Well, put another way, it's just a shorthand way of doing:
Code:
if (snowsrc.indexOf("dynamicdrive.com") != -1){
snowsrc = "snow.gif";
} else {
snowsrc = snowsrc;
}
And if done that way, in this case the highlighted and red else part can be skipped.
As I said, you don't need to worry about it. If you want date dependent images you can do that up front where the snowsrc is first defined.
Like if you wanted a different image for each month (near the top where it first defines snowsrc, you could replace that with):
Code:
snowsrc = new Date().getMonth() + '.gif';
That way it would look for 0.gif in Jan, 1.gif in Feb, and so on.
Bookmarks