your example of function is not fully correct.This is the correct program
<html>
<head>
<title>function</title>
</head>
<body>
<script language = "JavaScript">
function prod(a,b)
{
var x = a*b;
return x;
}
var mul = prod(10,10);
document.write("multiplication"+mul);
</script>
</body>
</html>
I also correct the example of Conditional JavaScript if-else Statement
<html>
<head>
</head>
<body>
<script type = "text/javascript">
var a = new Date()
var time = a.getHours()
if(time<20)
{
document.write("Good Morning");
}
else
{
document.write("good day");
}
</script>
</body>
</html>
javascript tutorialvinu pradeep May 31, 2012 at 12:00 PM
It is a request that will you please include "try it yourself" after every example code
java script and aspsara July 23, 2012 at 6:36 PM
wonderful website
Typo in conditional if-else exampleVinodh July 31, 2012 at 11:09 AM
The script tag doesn't have an opening angle bracket '<' (script type="text/javascript">)
javascriptjoginder October 19, 2012 at 11:00 AM
your example of function is not fully correct.This is the correct program <html> <head> <title>function</title> </head> <body> <script language = "JavaScript"> function prod(a,b) { var x = a*b; return x; } var mul = prod(10,10); document.write("multiplication"+mul); </script> </body> </html>
javascriptjoginder October 19, 2012 at 11:13 AM
I also correct the example of Conditional JavaScript if-else Statement <html> <head> </head> <body> <script type = "text/javascript"> var a = new Date() var time = a.getHours() if(time<20) { document.write("Good Morning"); } else { document.write("good day"); } </script> </body> </html>
Post your Comment