Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

divisible by 3 javascript

var n = Math.floor((Math.random() * 1000) + 1);
if (n) {
  var output = "";
  if (n % 3 == 0)
    output += "Rock";
  if (n % 5 == 0)
    output += "star";
  prompt(output || n);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: js test if array 
Javascript :: date now js 
Javascript :: reset div jquery 
Javascript :: javascript react useState update object 
Javascript :: js list pf objects 
Javascript :: await on observable 
Javascript :: find and filter in javascript 
Javascript :: To get thumbnail image from video file 
Javascript :: export all javascript 
Javascript :: jQuery hasClass() - check for more than one class 
Javascript :: jquery list all event listeners 
Javascript :: express server 
Javascript :: node js check type of variable 
Javascript :: pass params axios get react 
Javascript :: adjacent elements product javascript 
Javascript :: json query online 
Javascript :: add tailwind to vue 
Javascript :: react native run ios 
Javascript :: how to save and use item from local storage javascript 
Javascript :: tinymce update textarea value using jquery 
Javascript :: what is 5+5 
Javascript :: get src values of set of images inside div with pure JavaScript 
Javascript :: angular pipe percentage 
Javascript :: react append classname 
Javascript :: kebab case javascript 
Javascript :: angular jspdf 
Javascript :: error metro bundler process exited with code 1 react native 
Javascript :: Iterate object using ngFor in angular 
Javascript :: ajax select2 
Javascript :: mongoose update push 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =