Javascript best practices - Codeshool course