Welcome to the Treehouse Community
Looking to learn something new?
My solution to the special problem (it works finally) -- any suggestions?
It works! I am unreasonably happy about this.... Let me know if there are any improvements I can make to make it more maintainable, clearer to outside parties, or more efficient!
Looks pretty good. A couple of things you could do:
- the outputDiv is being gotten from the document every time the print function is called. That could be done outside the function so it's only grabbed once, and all the print function does is write some new output to it.
- Some simple version of templating could help build the report string instead of the rather long concatenation that's there now. This may help if you want to quickly re-format the report. Sometimes lots of concatenation confuses me; have I missed a plus sign, or have I put a semicolon in the right place, etc? Could use something like Handlebars, or write something very lightweight.
Hope this helps,