Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
dot.dom: A feature-rich JavaScript template engine in 510 byes
(opens in new tab)
(github.com)
3 points
icharala
9y ago
3 comments
Save
Share
3 comments
3 comments · 2 top-level
top
newest
oldest
hubert123
9y ago
· 1 in thread
What is this syntax? const {clicks=0} = state;
icharala
OP
9y ago
It's object deconstructuring, including a default value:
https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...
icharala
OP
9y ago
I created a codepen where you can try it in action:
https://codepen.io/anon/pen/Kargex?editors=0010#0
j
/
k
navigate · click thread line to collapse