Can use a lookup object:
var days = {
sunday: 1,
monday: 2,
tuesday: 3,
wednesday: 4,
thursday: 5,
friday: 6,
saturday: 7
}
console.log(days["sunday"]) //1
Now, simply access any of the above properties and it's value will be the numeric day of the week!
console.log(days["monday"]) //2