-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs15.html
More file actions
34 lines (29 loc) · 868 Bytes
/
js15.html
File metadata and controls
34 lines (29 loc) · 868 Bytes
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
<!--Operator Precedence
()
.
[]
++ -- (pre) (if same priority ope is there then order of execution is L->R )
**
* / %
+ -
> < >= <=
== != === !==
.......
=
++ -- (post)
<!--demo on js -->
<h3>demo on Operator Precedence</h3>
<script>
document.write(10-20/5+15*4,'<br>');
document.write(10+20*5-100%33,'<br>');
let x=13,y=9;
document.write("sum is "+x+y,'<br>');
document.write("sum is "+(x+y),'<br>');
document.write("sum is ",x+y,'<br>');
document.write("sub is "+x-y,'<br>');//performing some operation on non supported data type ther NaN error comes
document.write("sub is ",x-y,'<br>');
document.write("mul is " + x*y +'<br>');
document.write("res is "+ x>y,'<br>');
document.write("res is ", x>y,'<br>');
document.write("res is " +(x>y),'<br>');
</script>