Update faq.md

This commit is contained in:
Abhijith Chatra 2017-02-28 18:04:52 -08:00 committed by GitHub
parent e08148cac6
commit cdc0d12a98

View File

@ -6,15 +6,14 @@ For the @boardname@, we support a "static" subset of TypeScript (itself a supers
## Supported language features
* variables with `let`, `const`, and `var`
* variables with `let` and `const`
* functions with lexical scoping and recursion
* top-level code in the file; hello world really is `console.log("Hello world")`
* `if ... else if ... else` statements
* `while` and `do ... while` loops
* `for(;;)` loops (see below about `for ... in/of`)
* `for(;;)` loops and for ... of
* `break/continue`; also with labeled loops
* `switch` statement (on numbers only)
* `debugger` statement for breakpoints
* conditional operator `? :`; lazy boolean operators
* namespaces (a form of modules)
* all arithmetic operators (including bitwise operators); note that in microcontroller targets
@ -25,6 +24,7 @@ For the @boardname@, we support a "static" subset of TypeScript (itself a supers
* classes with fields, methods and constructors; `new` keyword
* array literals `[1, 2, 3]`
* enums
* class inheritance
## Unsupported language features
@ -32,10 +32,10 @@ We generally stay away from the more dynamic parts of JavaScript.
Things you may miss and we may implement:
* exceptions (`throw`, `try ... catch`, `try ... finally`)
* `for ... of` statements
* `for ... in` statements
* object literals `{ foo: 1, bar: "two" }`
* method-like properties (get/set accessors)
* class inheritance
* `debugger` statement for breakpoints
For JS-only targets we may implement the following: