Professional Documents
Culture Documents
JavaScript Strings
Activity 01:
Directions. Perform the programming code below.
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Strings</h2>
<p id="demo"></p>
<script>
// x is a string
let x = "Trishia";
// y is an object
let y = new String("Trishia");
document.getElementById("demo").innerHTML =
typeof x + "<br>" + typeof y;
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
let x = "John"; // x is a string
let y = new String("John"); // y is an object
document.getElementById("demo").innerHTML = (x==y);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
let x = new String("John"); // x is an object
let y = new String("John"); // y is an object
document.getElementById("demo").innerHTML = (x==y);
</script>
</body>
</html>
Prepared by:
Noted:
_______________________
Activity 1: Rubrics
Points Description
10 The student successfully executes the program without guidance or supervision.
The student successfully executes the program with very little supervision and
9
guidance.
The student successfully executes the program with moderate supervision andguidance.
8
The student was not able to execute the program but shows eagerness to accomplishthe
7
activity.
5 The student was not able to execute the program due to lack of interest in the activity.