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

Below I have tested the new features in JavaScript 1.6. 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.6

Array extras

The indexOf method

var arr = ["Microsoft", "Mozilla", "Apple"];
arr.indexOf("Mozilla");

Result: FAILED

Works in:

The lastIndexOf method

var arr = ["Firefox", "IE", "Chrome", "Firefox"];
arr.lastIndexOf("Firefox");

Result: FAILED

Works in:

The every method

var arr = [4, 7, 10];
arr.every(function (value) {
	return value > 5;
});

Result: FAILED

var arr = [6, 7, 10];
arr.every(function (value) {
	return value > 5;
});

Result: FAILED

Works in:

The filter method

var arr = [4, 7, 10];
arr.filter(function (value) {
	return value > 5;
});

Result: FAILED

Works in:

The forEach method

var arr = ["Firefox", "IE", "Chrome", "Opera", "Safari"]
	resultValues = [];
arr.forEach(function (value) {
	resultValues.push(value.toUpperCase());
});

Result: FAILED

Works in:

The map method

var arr = [4, 7, 10];
arr.map(function (value) {
	return value + 5;
});

Result: FAILED

Works in:

The some method

var arr = [4, 7, 10];
arr.some(function (value) {
	return value > 5;
});

Result: FAILED

var arr = [1, 2, 4];
arr.some(function (value) {
	return value > 5;
});

Result: FAILED

Works in:

Array and String generics

Array generics

var words = "These are just words";
Array.filter(words, function (value) {
	return value.indexOf("s") === -1;
});

Result: FAILED

Works in:

String generics

var arr = ["Firefox", "Safari", "Opera"];
String.replace(arr, /[aoueiy]/, "");

Result: FAILED

Works in:

String generics, global flag

// Notice global flag for string match
var arr = ["Firefox", "Safari", "Opera"];
String.replace(arr, /[aoueiy]/g, "");

Result: FAILED

Works in: