If deg is defined, not false, not null, and not 0, deg is set to its current value. Otherwise it's set to 90.
The OR operator (||) works by evaluating its left side and then returning the left or right side depending on if the evaluation was true/false.
If you wrote
a would be 5 because the expression 'false' is of course false.
If we instead did
b would be 6 because 1+a==6 and any number but 0 evaluates to true in an expression.
The AND (&&) operator can be used the same way. It returns its left side if it evaluates to true, in any other case it returns its right side.
I'm not sure what you mean by your other question.
You are missing a </head> between </SCRIPT> and <body> and you have an extra <SCRIPT> at the end.