{
var x = 0;
...
}
What are the curly braces supposed to do, it is clearly not a function or a loop, it's just empty curly braces with nothing before.
p.s. if anyone finds a better way to rephrase this question, please do
Those are called block statements, they are simply there to group together statements to be executed together.
Here are some useful links: https://www.w3schools.com/js/js_statements.asp https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/block
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With