Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Exercise 2

  1. This exercise is a work-log (aka timesheet) application. Run the fixed version of the exercise ("ex2-fixed.html") in your browser and play around to see the expected behavior.

  2. For this exercise, you should only need to make changes to "ex2.js", not the HTML or CSS. You should not need to create new functions or reorganize significant chunks of code for this exercise; only a few spot changes and a few lines of code are necessary.

  3. There are several things that can be improved in "ex2.js", including:

    • are there anonymous function expressions which could be improved with a lexical name?
    • are there usages of var which are more appropriate to be declared with let or const? Do any literal values need to be made into constant declarations?
    • should certain variable declarations be contained in explicit blocks of scope?
  4. BONUS: How would you describe to a coworker or boss the improvements in readability after applying your knowledge of scoped declarations to this code? Write out a few sentences.