Testing JavaScript 1.8.1 - To index of all tests and compatibility tables

Below I have tested the new features in JavaScript 1.8.1. The code below is also run immediately as you load the page, so you will see the actual results as well. Below each test is the web browsers it works in, and the minimum version of it required.

More information about JavaScript 1.8.1

Object.getPrototypeOf

var obj = {},
newObj = {};
newObj.prototype = obj.prototype;

Result: FAILED

Works in:

String extras

trim

var someString = "       Monkeys like bananas    ",
someStringTrimmed = someString.trim();

Result: FAILED

Works in:

trimLeft

var someString = "       Monkeys like bananas    ",
someStringTrimmedLeft = someString.trimLeft();

Result: FAILED

Works in:

trimRight

var someString = "       Monkeys like bananas    ",
someStringTrimmedRight = someString.trimRight();

Result: FAILED

Works in: