js date check day of week code example Example: javascript get day var d = new Date(); var n = d.getDay();