DEV Community

Amit Prajapati
Amit Prajapati

Posted on

Write the code to print the even numbers ?

for(let i=1;i<=50;i++){
    //Divided by 2 
    if(!(i%2)){
         console.log(i,'is the event number')
    }
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)