re: How to use the ?. operator in Javascript VIEW POST

re: As far as I know, this is available even in ES2015, is it not?


I saw it here and since it’s documented here, assumed it’s already present. I see the document was updated only recently and the cross browser stability has still not kicked in.
However I was able to use this in Typescript with es6 build (babel with backward compatibility) atleast 6-8 months back. Queer!

Usually when I read "ES6 build" it means it transpiles to ES6 code, rather than that it is already ES6 compatible. This operator, fortunately, is super easy to transpile back to older syntax, so Typescript has supported it (and the nullish coalescing operator) for a little while now

(Edit for tone, and to add some details)

This puts a lot of things into perspective! :) Thank you!

code of conduct - report abuse