-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJS3.html
More file actions
41 lines (33 loc) · 1.39 KB
/
JS3.html
File metadata and controls
41 lines (33 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Java Scritp Tutorial | String and strings methods </title>
</head>
<body>
<div class="container">
<h1>Lorem ipsum dolor sit.</h1>
<div id="content"></div>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque ipsum eos distinctio totam iusto blanditiis debitis soluta repellat voluptatum in aliquam vero atque minus magni, animi quibusdam assumenda voluptatem, facere ratione eveniet consectetur voluptates.</p>
</div>
<script>
var string = "this";
var name = "is";
var message = "Me"
var channel = "WebFusion"
var temp = `${string} is me harsh singh and my page ${channel}`
// console.log(string + name + message);
// console.log(temp);
// var len = channel.length;
// console.log(`the length of my name is ${len}`);
// Escape sequence character
console.log("Hello World\n Harsh\t and \b bye") //\n is new line character
//secon way for apply string is constructor
var y = new String("Hello");
console.log(y);
// how to insert a string in html using java
document.getElementById('content').innerHTML = '<h3>this is an h3 heading called javascript</h3>'
</script>
</body>
</html>