Write a for...of loop, with let - Javascript Statement

Javascript examples for Statement:for in

Description

Write a for...of loop, with let

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//from   www . j av  a2  s .  co  m
const days = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
for(let day of days){
    console.log(day.charAt(0).toUpperCase() + day.slice(1));
}
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials