Skip to content

Tern & ECMAScript5 support

angelozerr edited this page Sep 9, 2015 · 7 revisions

tern provides a support for ES5 with ecma5.json. It uses acorn parser which is able to parse ES5 JavaScript code.

After installing and converting your project as Tern Project, go at Tern project property, click on Tern / Modules item and select the ECMAScript module and 5 version:

Select ECMAScript Module

Array

ECMAScript 5 gives the capability to provide completion for Array :

ECMAScript Completion Array

In this sample, arr is an Array of number, the completion for elt item provides Number methods :

ECMAScript Completion ForEach Array

Clone this wiki locally