❔ Why is destructuring used like this?
Hi, I am trying to get a grasp on a code example I found on the tic-tac-toe game. One thing I struggle to understand, is why the parameters defined for this function are contained within curly brackets.
Why not just the paranthesis?
8 Replies
That's JavaScript
$js
ah, you mean to tell the programme its not just returning plain elements?
That syntax means it takes in an object with those 4 properties
No I mean this is a C# discord
You are asking a JavaScript question
oh sorry!
I didnt realize
check this server for JS questions
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.