Get Programming with JavaScript - Listings 15.02 and 15.03

Listings 15.02 and 15.03 - Testing two user views

HTML:

<!-- spacer --> <script src="http://output.jsbin.com/juneqo.js"></script> <!-- fitnessApp.User --> <script src="http://output.jsbin.com/fasebo.js"></script> <!-- fitnessApp.userView --> <script src="http://output.jsbin.com/yapahe.js"></script> <!-- fitnessApp.userViewEnhanced --> <script src="http://output.jsbin.com/puculi.js"></script>

JS:

var user = new fitnessApp.User("Mahesha"); user.addSession("2017-02-05", 35); user.addSession("2017-02-06", 45); fitnessApp.userView.render(user); fitnessApp.userViewEnhanced.render(user);