Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

odd even condition with ternary operator

let number = 15;
number %2 ==0 ? console.log(number ," is Even Number!!!"): console.log(number, " is Odd Number!!!");
Comment

PREVIOUS NEXT
Code Example
Javascript :: get filename from url js 
Javascript :: Get parent directory name in Node.js 
Javascript :: access laravel eloquent relation in js 
Javascript :: protractor right click on element 
Javascript :: prevent form from reloading with preventDefault 
Javascript :: angular delete from array by name 
Javascript :: click button when press enter javascript 
Javascript :: how to delete the last part of a string in node js 
Javascript :: javascript create uuid 
Javascript :: javascript settimeout params 
Javascript :: javascript set localstorage 
Javascript :: How can I refresh a page with jQuery 
Javascript :: mongoose connect to URL of atals 
Javascript :: dropzone add download button 
Javascript :: express js redirect to url 
Javascript :: redirect to another domain javascript 
Javascript :: get first two letter of an array javascript 
Javascript :: js remove zeros after decimal 
Javascript :: json-server 
Javascript :: hashnode.com 
Javascript :: docker react module not found 
Javascript :: discord js setinterval 
Javascript :: javascript remove first character from string 
Javascript :: angular filter array of objects 
Javascript :: push element to array to first place js 
Javascript :: jquery closest 
Javascript :: p5.js add class to button 
Javascript :: object to query string js 
Javascript :: js omit last string 
Javascript :: use local storage on server with node 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =