Page 140 - Computer Software Application TP - Volume 1
P. 140
COMPUTER SOFTWARE APPLICATION - CITS
</head>
<body>
<script>
let x = true;
let y = false;
// Logical AND (&&)
console.log(“Logical AND:”, x && y); // Output: false
// Logical OR (||)
console.log(“Logical OR:”, x || y); // Output: true
// Logical NOT (!)
console.log(“Logical NOT for x:”, !x); // Output: false
console.log(“Logical NOT for y:”, !y); // Output: true
</script>
</body>
</html>
3 Save the program as a .html file
4 Open the html file with a web browser
5 Go to the browsers console tab and verify the output.
IV Assignment Operators
1 Open the text editor
2 Write the following codes
<html >
<head>
<title> Assignment Operators </title>
</head>
<body>
<script>
let a = 10;
125
CITS : IT & ITES - Computer Software Application - Exercise 38 CITS : IT & ITES - Computer Software Application - Exercise 38