DEV Community

Nimal Anand
Nimal Anand

Posted on

conditional statements

IN Java script we use if and else for conditional statements.
we declare a varaiable with a initial value and we give a condition using if ,If the condition is fullfilled the contents of operations inside the brackets would be executed and if the conditions is failed then else would be executed.
let i=0
if i<=10{
console.log(i)
i++
}else
{
exit
}.

Top comments (0)