-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringoperations.html
More file actions
19 lines (19 loc) · 838 Bytes
/
Copy pathstringoperations.html
File metadata and controls
19 lines (19 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<body>
<p id="demo"></p>
<script>
const str1="double";
const str2="trouble";
document.writeln("converting "+str1+" to uppercase : ");
document.writeln(str1.toUpperCase()+"<br>");
document.writeln("converting "+str2+" to uppercase : ");
document.writeln(str2.toUpperCase()+"<br>");
document.writeln("concatenate "+str1+" and "+str2+" : ");
document.writeln(str1.concat(str2)+"<br>");
document.writeln("character in string "+str1+" at index position 3 is : "+str1.charAt(3)+"<br>");
document.writeln("character in string "+str2+" at index position 3 is : "+str2.charAt(3)+"<br>");
document.getElementById("demo").innerHTML;
</script>
</body>
</html>