Hacker News new | ask | show | jobs
by hubert123 3412 days ago
What is this syntax? const {clicks=0} = state;
1 comments

It's object deconstructuring, including a default value: https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...