added problem statement, logic diagram, and js code for my 2nd midterm