String.prototype.localeCompare() broken?

I've been programming a lot JScript lately (new project incoming) and had the same problem with documentation.
What I've found is JScript is simply a reverse-engineered ECMAScript v3 according to multiple sources. And I can confirm that it is mostly ES3 indeed. Funnily JScript has JSON.parse & JSON.stringify, but other than that it's just ES3, which came out 1999. It lacks quite a lot of nice features of say ES5, but many missing methods, like .keys(), .trim(), .toISOString(), etc. can be easily added.
Here's something from my own source code; I had put the comment before finding out JScript is ES3.

	String.prototype.trim = function () {
		return this.replace(/^\s+|\s+$/g, ''); // not even trim() JScript??
	}

EDIT: Here's one quite an authoritative source for my info; Resig is the creator of jQuery:
https://johnresig.com/blog/versions-of-javascript/

2 Likes