General extensions for JavaScript