Week 10 - Lecture
Week 10 - Lecture
Introduction to JavaScript
Sukrit Shakya
[email protected]
var hh = String(true);
will convert a boolean to a string
// single-line comment
/* this is a
multi-line comment */
if (hour < 10) {
greeting = "Good morning";
} else if (hour < 20) {
greeting = "Good day";
} else {
greeting = "Good evening";
}
do {
statements;
}
while (condition);
<script>
/* JavaScript code goes here. */
</script>
</body>
</html>
</body>
</html>
script1.js
js_demo.html