JavaScript tests & Compatibility tables

In this web site I have collected various JavaScript tests, to display code samples, have them run and check web browser compatibility.

Test pages

Compatibility tables

JavaScript 1.6

Method/feature Web browser support
Array extras:
The indexOf method
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
The lastIndexOf method
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
The every method
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
The filter method
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
The forEach method
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
The map method
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
The some method
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
Array and String generics:
Array generics
  • Firefox 2.0+
String generics
  • Firefox 2.0+

JavaScript 1.7

Method/feature Web browser support
Generators
  • Firefox 2.0+
Iterators
  • Firefox 2.0+
Array comprehensions
  • Firefox 2.0+
Using let for block scope
  • Firefox 2.0+
Destructuring assignment
  • Firefox 2.0+
  • Opera 9.5+ (partial support, some combinations don't work)
Destructuring assignment with let statement
  • Firefox 2.0+

JavaScript 1.8

Method/feature Web browser support
Expression closures
  • Firefox 3.0+
Generator expressions
  • Firefox 3.0+
Array extras:
reduce
  • Firefox 3.0+
  • Google Chrome 4.0+
  • Safari 4.0+
  • Opera 10.5+
reduceRight
  • Firefox 3.0+
  • Google Chrome 4.0+
  • Safari 4.0+
  • Opera 10.5+

JavaScript 1.8.1

Method/feature Web browser support
Object.getPrototypeOf
  • Firefox 3.5+
  • Google Chrome 5.0+
String extras:
The trim method
  • Firefox 3.5+
  • Google Chrome 5.0+
  • Opera 10.5+
The trimLeft method
  • Firefox 3.5+
  • Google Chrome 5.0+
The trimRight method
  • Firefox 3.5+
  • Google Chrome 5.0+

Getters and setters, and Object.defineProperty

Method/feature Web browser support
Regular getters and setters:
Object literal notation
  • Internet Explorer 9.0+
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
Object notation
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
On DOM elements
  • Firefox 2.0+
  • Google Chrome 1.0+
  • Safari 3.0+
  • Opera 9.5+
Object.defineProperty:
On Objects
  • Internet Explorer 9.0+
  • Firefox 4.0+
  • Google Chrome 5.0+
  • Safari 5.1.7+
  • Opera 11.6+
On DOM elements
  • Internet Explorer 8.0+
  • Firefox 4.0+
  • Google Chrome 5.0+
  • Safari 5.1.7+
  • Opera 11.6+

DOM Storage / Web Storage

Method/feature Web browser support
sessionStorage
  • Internet Explorer 8.0+
  • Firefox 2.0+
  • Google Chrome 5.0+
  • Safari 4.0+
  • Opera 10.5+
localStorage
  • Internet Explorer 8.0+
  • Firefox 3.5+
  • Google Chrome 4.0+
  • Safari 4.0+
  • Opera 10.5+

Native JSON

Method/feature Web browser support
Native JSON:
JSON.parse
  • Internet Explorer 8.0+
  • Firefox 3.5+
  • Google Chrome 4.0+
  • Safari 4.0+
  • Opera 10.5+
JSON.stringify
  • Internet Explorer 8.0+
  • Firefox 3.5+
  • Google Chrome 4.0+
  • Safari 4.0+
  • Opera 10.5+