• + 0 comments
    function getDayName(dateString) {
        return  ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][new Date(dateString).getDay()];
    }``
    

    This is my solution , guess what , it is the easiest solution for this problem.