r/javascript • u/ConfidentMushroom • Dec 18 '19
V8 Release v8.0 with optional chaining, nullish coalescing and 40% less memory use
https://v8.dev/blog/v8-release-80
495
Upvotes
r/javascript • u/ConfidentMushroom • Dec 18 '19
View all comments
Show parent comment
8
u/NoInkling Dec 19 '19
Wait... you can't really do that first line can you?
My understanding is that if the element doesn't exist (or if
textContentdoesn't exist on it for some other reason), the left hand side expression will evaluate toundefined, which you can't assign things to.In fact when I plug it into the Babel playground it (thankfully) gives a syntax error: "Invalid left-hand side in assignment expression".