Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js even or

function isEven(n) {
   return n % 2 == 0;
}

function isOdd(n) {
   return Math.abs(n % 2) == 1;
}
Comment

odd or even js

for(let count =0; count<=100;count++){
 count%2==0? console.log(`${count} is even`):console.log(`${count} is odd`);
 ;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: vanilla js delete element 
Javascript :: get attribute of selected option jquery 
Javascript :: on keyup jquery 
Javascript :: html5 store object in localstorage 
Javascript :: p5 map function 
Javascript :: js replace single quote with doubel quote 
Javascript :: npx react 
Javascript :: datatables clear table 
Javascript :: react native view background transparency 
Javascript :: js async anonymous function 
Javascript :: javascript leave page warning 
Javascript :: 50 50 chance javascript 
Javascript :: js is object empty 
Javascript :: javascript math.random from list 
Javascript :: check if date time string is invalid date js 
Javascript :: Remove specific object from the Array in Javascript 
Javascript :: javascript to redirect to another page after 5 seconds 
Javascript :: document .ready 
Javascript :: jquery prevent event bubbling 
Javascript :: trigger change select element jquery 
Javascript :: kill all node process ubunut 
Javascript :: jquery select on select 
Javascript :: how do i backspace from javascript calculator 
Javascript :: ec2 yum nodejs 
Javascript :: aws s3 cors configuration json example 
Javascript :: jquery scroll to top of div animate 
Javascript :: js math round up 
Javascript :: jquery wordpress starter code 
Javascript :: jquery if checkbox checked 
Javascript :: hello world javascript 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =