🏠 back to Observable

ECMAScript 2020 syntax

Good news, fans of modern JavaScript. We just added support for the nullish coalescing operator, optional chaining operator, and logical assignment operators. See this notebook for details:

9 Likes

This is great.

I noticed that on my phone (iPhone) the bottom two cells error with “Unexpected token ‘=’”.

Does using these features incur a risk that they may be unsupported on some platforms?

Absolutely, since Observable does not transpile* your code. Check the compatibility table here (you may need to scroll up a little, in case the row is covered by the table header):

https://kangax.github.io/compat-table/es2016plus/#test-Logical_Assignment

* Except for Observable-specific syntax like viewof and mutable references

4 Likes