if else in javascript :-
Syntax:
if(condition)
{
//code for execution;
}
else
{
//code for execution;
} (more…)
if else in javascript :-
Syntax:
if(condition)
{
//code for execution;
}
else
{
//code for execution;
} (more…)
An alert box is often used if you want to give any information to the user.
Syntax :
alert(”text“);
Example:-
function popupalert()
{
alert(’This is an alert box.’);
} (more…)
Comments can be used to make the code more readable.
Single line comments start with //.
<script type=”text/javascript”>
// This will write a header:
document.write(”<h1>This is a header</h1>”); (more…)