Learning Web App Development

by Semmy Purewal

duplicate organizeByTag function

page 171

17 May 2014

On page 171, the test example has the organizeByTag function declared and defined in two places. One definition should be removed.

In addition, the one defined inside the main function doesn’t take the toDoObjects parameter.

It’s probably a better practice to define it in the main function instead of outside of it (that way it’s ‘hidden’ from the global scope), but since this is just a test application to set up the functionality, it doesn’t really matter either way.

Thanks to Ken Hommel for pointing this out!