JavaScript homework - cheatsheet