bfrisco – 00-42 Jan 1

Is there a purpose of what I am dubbing as "blanket brackets" within functions? Example:
await socket.connect({host, port, timeout: 5000});
{ // <--- what is this?
socket.writeVarInt(0x00);
socket.writeVarInt(50);
// ...
}

let response;
// ...
await socket.connect({host, port, timeout: 5000});
{ // <--- what is this?
socket.writeVarInt(0x00);
socket.writeVarInt(50);
// ...
}

let response;
// ...
I've seen this a couple times in open source repos, wondering if that's just an oversight or if this actually does something.
UU
Unknown User474d ago
B
Brice474d ago
If no variables are defined inside of it, is it just meaningless then?
UU
Unknown User474d ago
B
Brice474d ago
From a functional standpoint Ok, thanks Ah okay, I do see comments on top of each now. It must just be a visual thing like you said. Nice to know about the variable scoping though.
UU
Unknown User474d ago
B
Brice474d ago
In this case it makes a lot of sense (writing packets)
UU
Unknown User473d ago
More Posts
✅ – Sorrow – 21-59 Dec 30Hi, I'm following this tutorial (https://reactjs.org/tutorial/tutorial.html#showing-the-past-moves) Box Element causing overflows on smaller screens, even though it does not reach the end of screenI am using Material UI with React and Webpack On smaller screens my react box component makes the sc✅ – _mercury – 21-33 Dec 30I had many instances of divs that each contains an input they are generated dynamically I want ant✅ – Script – 23-31 Dec 29how can I conditionally render `checked` in this radio input `<input type="radio" checked />`Alex. – 09-19 Dec 29I need to replace the url using regex, current url : `http://localhost:3000/#/test/id/123456&gid=1&pNext-steps scaling up and expandingHey guys, so I wanted your opinion and seek some guidance on how to proceed with this *issue* For so✅ – mzeeshan – 14-02 Dec 28hello there..... RegExp Question.... i'm beginner in RegExp. i have a variable `search` that contaiCannot display table using ReactHi, I am trying to display a simple table but it is showing me error. Been stuck on this for two we✅ – Perke – 18-27 Dec 26For every 13 objects id like to get an object like {size: "7", asks: [200,220,250]} so basically siz✅ – _mercury – 21-58 Dec 25what could by the reason that this func sends 2 reqs ? ```js async saveProduct(cartoon) { mzeeshan – 18-54 Dec 25hello there... Question..... what is the meaning of `line 4` , i mean why there is `, e` .......? ``✅ – Cooly – 23-00 Dec 24```js await ref.recipes.forEach(async(doc) => { await firebase.firestore().collection("recipes").doc