javascript study notes -- some code and some ideas