Jordie
Suspended / Banned
- Messages
- 1,828
- Name
- Jordie
- Edit My Images
- Yes
Hi to all who know.
I am teaching myself JS from a book, which I must say is top notch.
The only down side with it, is it doesnt fully explain some of the expressions.
Here is the code I am working on. I just dont understand why the bits in bold is the way it is.
And whats the deal with the "||" isnt it just the same as "&&"?
Can anyone explain this too me?
Thanks in advance.
I am teaching myself JS from a book, which I must say is top notch.
The only down side with it, is it doesnt fully explain some of the expressions.
<html>
<head>
</head>
<body>
<script language="javascript">
daysOfMonth = 29;
Year = 2009;
if (daysOfMonth == 28 || daysOfMonth == 29)
month = "February";
if (daysOfMonth == 29 && (Year % 4) == 0)
LeapYear = true;
document.write("Days of Month: " + daysOfMonth + "<br>");
document.write("Month: " + month + "<br>");
document.write("Year: " + Year + "<br>");
document.write("Leap Year: " +LeapYear +"<br>");
</script>
</body>
</html>
Here is the code I am working on. I just dont understand why the bits in bold is the way it is.
And whats the deal with the "||" isnt it just the same as "&&"?
Can anyone explain this too me?
Thanks in advance.
