-
Notifications
You must be signed in to change notification settings - Fork 0
/
javascrpet.html
73 lines (64 loc) · 1.66 KB
/
javascrpet.html
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>intro to java </h1>
<script>
//console.log("hllw world")
//variable
// var a=5;
//in place of var let can be used
// let g=10;
//var b=4;
//console.log() is used to print
// console.log("value of a :"+a,b)
//operator
//unary operator
// let c=5
//c=-c
//console.log(c)
//binary operator
//string
str=("tap it get it")
// console.log(str)
let name ="hitesh "
let roll="41"
let temp=`my name is : ${name},roll is ${roll}`
console.log(temp)
// let length=str.length
// console.log(length)
//let length=str.match
//console.log(length)
// let length1 =str.lastindexof
// console.log(length1)
// let length2 =str.temp
//else if ()
// {
//
// }
//SWICH CASE
//synatax
//let a=10;
//
// switch(a){
// case 2:
// console.log("value of a is 2");
// break;//break is compalsoury after every switch case other it print the all cases
//case 6:
// console.log("value of a is 6");
//case 10:
// console.log("value of a is 6");
//}
// let a=5
//let b=4
// alert("this is an alert")
let a=prompt("this is promot","guest")
console.log(a)
</script>
</body>
</html>