Lets take an example
In this example we have assign value to a variable named as "my_var".
var linebreak = "<br />"
var my_var = "MCN IT SOLUTION"
when we run this program value assign to variable named as my_var
Following is the table of logical operators
||is true if both a and b are true
||is true if either a or b is true
||is true if a is not true
Lets take an example Logical AND operator
x = prompt('Input a number(between 1 and 50) : ');
if (x >= 1 && x < 50)
alert('The number is between 1 and 50..');
alert('beyond the limit.... ');
If we run this program and put value 45 then
If we enter 45 then
You may also want to read these related articles :
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here