Some JavaScript practices