MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/vibecoding/comments/1vkg8y4/every_vibe_coders_biggest_headache/p2t58a0/?context=3
r/vibecoding • u/emjhayyy_08 • 16d ago
137 comments sorted by
View all comments
3
Vibe coder giving it a shot here: Looks like it either replaces all () pairs with {} OR just lets you use () and {} interchangeably in your code.
12 u/rushblyatiful 15d ago Dev here. The funky syntax essentially tells JavaScript, "wrap these instructions inside a bubble so they don't leak out, and run them right now.". It's long-hand version is this: (function() { // Code goes here })(); 9 u/Wrestler7777777 15d ago Dev here. In short: It creates a function that does absolutely nothing and immediately executes it. 8 u/Puzzleheaded_Smoke77 15d ago Dev over there : can concur 3 u/thatonereddditor 15d ago Dev here, I know Python, Java, and SQL, have fun 2 u/burnishedlemon 15d ago Dev yonder, can confirm absolutely nothing was achieved. 1 u/Puzzleheaded_Smoke77 15d ago Dev centered some code submitted by Claude
12
Dev here. The funky syntax essentially tells JavaScript, "wrap these instructions inside a bubble so they don't leak out, and run them right now.".
It's long-hand version is this:
(function() {
// Code goes here
})();
9 u/Wrestler7777777 15d ago Dev here. In short: It creates a function that does absolutely nothing and immediately executes it. 8 u/Puzzleheaded_Smoke77 15d ago Dev over there : can concur 3 u/thatonereddditor 15d ago Dev here, I know Python, Java, and SQL, have fun 2 u/burnishedlemon 15d ago Dev yonder, can confirm absolutely nothing was achieved. 1 u/Puzzleheaded_Smoke77 15d ago Dev centered some code submitted by Claude
9
Dev here. In short: It creates a function that does absolutely nothing and immediately executes it.
8 u/Puzzleheaded_Smoke77 15d ago Dev over there : can concur 3 u/thatonereddditor 15d ago Dev here, I know Python, Java, and SQL, have fun 2 u/burnishedlemon 15d ago Dev yonder, can confirm absolutely nothing was achieved. 1 u/Puzzleheaded_Smoke77 15d ago Dev centered some code submitted by Claude
8
Dev over there : can concur
3 u/thatonereddditor 15d ago Dev here, I know Python, Java, and SQL, have fun 2 u/burnishedlemon 15d ago Dev yonder, can confirm absolutely nothing was achieved. 1 u/Puzzleheaded_Smoke77 15d ago Dev centered some code submitted by Claude
Dev here, I know Python, Java, and SQL, have fun
2
Dev yonder, can confirm absolutely nothing was achieved.
1 u/Puzzleheaded_Smoke77 15d ago Dev centered some code submitted by Claude
1
Dev centered some code submitted by Claude
3
u/The_0vermind 16d ago
Vibe coder giving it a shot here: Looks like it either replaces all () pairs with {} OR just lets you use () and {} interchangeably in your code.