Code review
derekeder opened this issue · 0 comments
GitHub is good at having comments on individual commits, but not on entire files, so writing my notes here.
Overall, really good organization in cartodb_lib.js
and map.js
. You did a good job in splitting out the functionality, especially here.
In several places, you have some code to iterate through a list using a for
statement. This is generally ok, but I've found it can lead to more potential indexing typos/errors and a little harder to read. Instead, I use jQuery's .each()
function which gives you back a nice object to work with.
There's some commented code in map.js
which can be removed. With version control history, keeping stuff like this around isn't necessary unless you're actively debugging / developing it.
Remove the js-example-*
from the select2 elements.