function init() {
    //Time variables
    var days, now, today, day, hour, minute, ampm, time, indicators;

    // DOM strings
    var todayDOM, timeDOM, DOMs;
    todayDOM = document.querySelector('.info__day');
    timeDOM = document.querySelector('.info__time');

    // Setting indicators panel to 'hidden'
    toggleVisibility('.toggle-display', 'hidden');

    // Setting day of the week and time
    days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];

    now = new Date();
    today = now.getDay();
    day = days[today];

    var displayTime = function () {
        hour = now.getHours();
        minute = now.getMinutes();
        ampm = hour >= 12 ? 'PM' : 'AM';
        minute = minute < 10 ? '0' + minute : minute;
        time = hour + ':' + minute + ' ' + ampm;

        return time;
    }

    todayDOM.textContent = day;
    timeDOM.textContent = displayTime();

}
// Function hides all variable elements such as city, temperature, indicators etc. Only day of the week is displayed and time. Time format is also taken into account.
Function hides all variable elements such as city, temperature, indicators etc. Only day of the week is displayed and time. Time format is also taken into account.
Function hides all variable elements such as city temperature indicators etc . Only day of the week is displayed and time . Time format is also taken into account .
function init() {
    var days, now, today, day, hour, minute, ampm, time, indicators;
    var todayDOM, timeDOM, DOMs;
    todayDOM = document.querySelector('.info__day');
    timeDOM = document.querySelector('.info__time');
    toggleVisibility('.toggle-display', 'hidden');
    days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
    now = new Date();
    today = now.getDay();
    day = days[today];
    var displayTime = function () {
        hour = now.getHours();
        minute = now.getMinutes();
        ampm = hour >= 12 ? 'PM' : 'AM';
        minute = minute < 10 ? '0' + minute : minute;
        time = hour + ':' + minute + ' ' + ampm;
        return time;
    }
    todayDOM.textContent = day;
    timeDOM.textContent = displayTime();
}
function init ( ) { var days , now , today , day , hour , minute , ampm , time , indicators ; var todayDOM , timeDOM , DOMs ; todayDOM = document . querySelector ( '.info__day' ) ; timeDOM = document . querySelector ( '.info__time' ) ; toggleVisibility ( '.toggle-display' , 'hidden' ) ; days = [ 'Sunday' , 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Friday' , 'Saturday' ] ; now = new Date ( ) ; today = now . getDay ( ) ; day = days [ today ] ; var displayTime = function ( ) { hour = now . getHours ( ) ; minute = now . getMinutes ( ) ; ampm = hour >= 12 ? 'PM' : 'AM' ; minute = minute < 10 ? '0' + minute : minute ; time = hour + ':' + minute + ' ' + ampm ; return time ; } todayDOM . textContent = day ; timeDOM . textContent = displayTime ( ) ; }
Function hides all variable elements such as city, temperature, indicators etc.
Function hides all variable elements such as city temperature indicators etc .
//Time variables // DOM strings // Setting indicators panel to 'hidden' // Setting day of the week and time