A few convenience functions for Javascript that should be in the language