Structure Query Language, C programming, Java, Servlet, Jsp, Unix

Saturday, 28 January 2012

Write a JavaScript that demonstrates the use of +=,-=,*=,/= operators.


<html>
<head>
<title>GTU SECOND PROGRAM </title>
<head>
<script language="javascript">
document.write("Use of ShortHand Operator");
document.write("<br><br>=================================<br>");
var A=100,B=50;
document.write("A = "+A + ",  B = "+B+"<br><br>");
document.write("1. A+=B : "+(A+=B)+"<br\>");
var A=100,B=50;
document.write("2. A-=B : "+(A-=B)+"<br\>");
var A=100,B=50;
document.write("3. A*=B : "+(A*=B)+"<br\>");
var A=100,B=50;
document.write("4. A/=B : "+(A/=B)+"<br\>");
document.write("=================================<br>");
</script>
</head>
<body>
</body>
</html>

No comments:

Post a Comment