Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get week day name in javascript

const day= new Date().getDay() //return 0 to 6
let weekday= ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
console.log(weekday[day])
Comment

javascript week day name

let weekday = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][new Date().getDay()]
document.write(weekday)
Comment

day of week javscript

const weekday = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];

const d = new Date();
let day = weekday[d.getDay()];
alert(day);
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript trim each element in array 
Javascript :: how to check if localhost javascript 
Javascript :: how to update node modules 
Javascript :: jquery each data 
Javascript :: javascript array to comma separated string 
Javascript :: firebase authentication logout 
Javascript :: ajax post 
Javascript :: js get url params 
Javascript :: js before unload 
Javascript :: javascript assign value to input using name 
Javascript :: split by whitespace javascript 
Javascript :: remove menu bar electron 
Javascript :: javascript prepend element to array 
Javascript :: classname toggle js 
Javascript :: &nbsp replace javascript 
Javascript :: check if an id exists javascript 
Javascript :: javascript read json file 
Javascript :: js mouse enter 
Javascript :: How to parse POST requests with express nodejs 
Javascript :: allow only letters javascript 
Javascript :: javascript sorting array string by len 
Javascript :: .on change get value 
Javascript :: how to move an image with arrow keys in javascript 
Javascript :: javascript removing items looping through array 
Javascript :: sleep function javascript 
Javascript :: fizzbuzz js 
Javascript :: js array value that appears odd number of times 
Javascript :: js clean nested undefined props 
Javascript :: subtract 18 years from today javascript 
Javascript :: test if is undefined javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =