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
var arr = ["Microsoft", "Mozilla", "Apple"];
arr.indexOf("Mozilla");
Result: FAILED
2.0+
3.0+
1.0+
9.5+
var arr = ["Firefox", "IE", "Chrome", "Firefox"];
arr.lastIndexOf("Firefox");
Result: FAILED
2.0+
3.0+
1.0+
9.5+
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
2.0+
3.0+
1.0+
9.5+
var arr = [4, 7, 10];
arr.filter(function (value) {
return value > 5;
});
Result: FAILED
2.0+
3.0+
1.0+
9.5+
var arr = ["Firefox", "IE", "Chrome", "Opera", "Safari"]
resultValues = [];
arr.forEach(function (value) {
resultValues.push(value.toUpperCase());
});
Result: FAILED
2.0+
3.0+
1.0+
9.5+
var arr = [4, 7, 10];
arr.map(function (value) {
return value + 5;
});
Result: FAILED
2.0+
3.0+
1.0+
9.5+
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
2.0+
3.0+
1.0+
9.5+
var words = "These are just words";
Array.filter(words, function (value) {
return value.indexOf("s") === -1;
});
Result: FAILED
2.0+
var arr = ["Firefox", "Safari", "Opera"]; String.replace(arr, /[aoueiy]/, "");
Result: FAILED
2.0+
// Notice global flag for string match var arr = ["Firefox", "Safari", "Opera"]; String.replace(arr, /[aoueiy]/g, "");
Result: FAILED
2.0+