Status of core JavaScript language features in GiavaScript.
| Feature | Status |
|---|
var declaration | Available |
var without initializer | Available |
Reassignment with = | Available |
Compound assignment (+=, -=, *=, /=) | Available |
Postfix increment and decrement (++, --) | Available |
let | Not available |
const | Not available |
| Feature | Status |
|---|
Numeric literals (int, float) | Available |
| String literals (single and double quotes) | Available |
Arithmetic (+, -, *, /, %) | Available |
Exponent operator (^, non-standard) | Available |
| Parenthesized expressions | Available |
Comparisons (<, >, <=, >=) | Available |
Equality (==, !=) | Available |
Strict equality (===, !==) | Available |
Logical operators (&&, ||, !) | Available |
typeof operator | Available |
void operator | Available |
Unary plus (+) | Available |
Comments (//, /* */) | Available |
| Template literals | Available |
== and != use coercive (loose) equality behavior.
=== and !== use strict (non-coercive) equality behavior.
typeof returns string representations of value types:
"number" for Int32 and Float64
"string" for String
"boolean" for Bool
"object" for Array, Hash, and null
"function" for callable values (user-defined and built-in)
"undefined" for undefined and undeclared identifiers (does not throw)
a && b: evaluates a first; if a is falsy, returns a and does not evaluate b; otherwise evaluates and returns b.
a || b: evaluates a first; if a is truthy, returns a and does not evaluate b; otherwise evaluates and returns b.
!a: evaluates a and returns a boolean negation (true/false).
a ? b : c: evaluates a first; if a is truthy, evaluates and returns b; otherwise evaluates and returns c.
- Precedence:
! binds tighter than &&, && binds tighter than ||, and || binds tighter than ? :.
| Feature | Status |
|---|
Function declarations (function name(...) { ... }) | Available |
Function expressions (var f = function(...) { ... }) | Available |
Named function expressions (var f = function name(...) { ... }) | Available |
Arrow functions (() => expr, x => expr, () => { ... }) | Available |
| Function calls | Available |
Returning values with return | Available |
| First-class function values | Available |
if, else if, else | Available |
C-style for loops (for (init; condition; update)) | Available |
for...of loops (iterate over arrays and strings) | Available |
for...in loops (iterate over object keys) | Available |
break / continue inside loops | Available |
while / do...while loops | Available |
Ternary operator (a ? b : c) | Available |
switch statements | Available |
throw statements | Available |
try / catch / finally | Available |
| Feature | Status |
|---|
null | Available |
undefined | Available |
| Array literals and indexing | Available |
| Object literals | Available |
| Dot and bracket property access | Available |
| Template literals | Available |
| Feature | Status |
|---|
parseInt() | Available |
parseFloat() | Available |
isNaN() | Available |
readLine() | Available |
Date.now() | Available |
new Date() | Available |
console.log() | Available |
console.warn() | Available |
console.error() | Available |
- This reflects the current behavior in the interpreter and specs.
let and const declarations return explicit errors: Error: unsupported declaration 'let' and Error: unsupported declaration 'const'.
- Use
var for variable declarations.
- Statements can be separated by newlines without requiring semicolons. A semicolon is not required when two statements are on separate lines.