Week 2

2-1



Part 1: Decode


Use the Decode process to practice reading and analyzing code before running it to predict the outcome.



  • Decode 1 


▲ First part is the task, croll down to see my comment and the modified version ▲



  • ▲ Move your mouse!▲




  • Decode 2

  • ▲ First part is the task, croll down to see my comment and the modified version ▲


  • ▲ Move your mouse!▲



  • Decode 3


  • ▲ First part is the task, croll down to see my comment and the modified version ▲

I changed the number in the for loop and added two console.log to know how many times the different if conditions happen.





  • Decode 4


▲ First part is the task, croll down to see my comment and the modified version ▲

I add two console.log to observe the startX and endX. 




  • ▲ Click your mouse! ▲




  • Decode 5

▲ First part is the task, croll down to see my comment and the modified version ▲


  • ▲ Move your mouse!▲