This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whatTimeIsIt(currentTime) { | |
var hr = currentTime.getHours(); | |
if(hr < 12) { | |
return "morning"; | |
} | |
if(hr < 16) { | |
return "afternoon"; | |
} | |
if(hr > 16) { | |
return "evening"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whatTimeIsIt() { | |
var currentTime = new Date(); | |
var hr = currentTime.getHours(); | |
if(hr < 12) { | |
return "morning"; | |
} | |
if(hr < 16) { | |
return "afternoon"; | |
} | |
if(hr > 16) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whatsMyLevel(scale) { | |
let map = new Map(); | |
map.set('beginner', '0-20'); | |
map.set('familier', '21-50'); | |
map.set('familier', '51-50'); | |
map.set('expert', '71-90'); | |
map.set('guru', '91-99'); | |
let level = "god"; | |
map.forEach( (value, key, map) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whatsMyLevel(scale) { | |
let map = new Map(); | |
map.set('beginner', '0-20'); | |
map.set('familier', '21-50'); | |
map.set('expert', '51-90'); | |
map.set('guru', '91-99'); | |
let level = "god"; | |
map.forEach( (value, key, map) => { | |
let range = value.split("-"); |