Billig Smålån | Kuulokkeet | Kredittkort Best i Test | Strømpriser Sammenligning | Alarmer | Hundeforsikring | Billig Mobilabonnement | Billig Bilforsikring
JavaScript programming

Types of Operators java script

JavaScript is used in a wide variety of operators. These are:

  • Arithmetic Operator
  • Assignment Operator
  • Increment/decrements Operator
  • Logical Operator
  • Concatenation Operator
  • Conditional

Practice Project:

<html>
<head>
<title> www.trickbd.com.bd</title>
<style>
body{background: #FFC;
font-size:20px;}
h2{color:#FF0066;}
</style>

</head>
<body>
<script type = “text/java script”>
var a = 30;
var b = 20;
var c ;
c = ( a + b )*a-b;
document.write(“<p>( A + B )× A – B = C = ”
+ c + “.</p>”);
document.write(“<p>A= ”
+ a + “.</p>”);
document.write(“<p>B= ”
+ b + “.</p>”);
if( a>b ){
document.write(“<p>The largest value is A </p>”);
}
else{
document.write(“<p>The largest value is B</p> “);
}
var d = true;
var e = false;
var f = !e;
document.write( “F = ” +f + “<br />” );
var g = d & f;
document.write( “G = ” +g+ “<br />” );
for (var i = 0; i < 6; i++)
{
document.write(“The value of X is ” + i);
document.write(“<br />”);
}
document.write(“<br />”);
for (var j = 10; j > 4; j–)
{
document.write(“The value of J is ” + j);
document.write(“<br />”);
}
</script>
</body>

</html>

Notepad: to open a file type from the menu at the top of layer code by clicking on the Save as File name: index.html, Save as type: All files, save and open the index.html file with the Mozilla Firefox look like the image shown below.

( A + B )× A – B = C = 1480.

A= 30.

B= 20.

The largest value is A

F = true
G = 1
The value of X is 0
The value of X is 1
The value of X is 2
The value of X is 3
The value of X is 4
The value of X is 5

The value of J is 10
The value of J is 9
The value of J is 8
The value of J is 7
The value of J is 6
The value of J is 5

At the top of the program used by +, -, * arithmetic operator.

= Assignment operator to use the program.

++ Increment operator used in the program.

Used the program -Discernment operator.

Program used <,> Comparison operator.

Program used &,! Logical operator.

Comments

comments

About the author

Toriqul Islam Tusher

বলার মত কিছু নাই!

Leave a Comment