JavaScript recipes