2017-08-19 18 views

答えて

1

var now = new Date(); 
 
var hour = now.getHours(); 
 
var minute = now.getMinutes(); 
 

 
minute = minute - (minute % 10); 
 

 
while (hour < 24) { 
 
    minute += 10; 
 
    
 
    if(minute === 60) { 
 
    hour++; 
 
    minute = 0; 
 
    } 
 
    
 
    console.log(hour + ':' + (minute || '00')) 
 
}

関連する問題