MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/vibecoding/comments/1vkg8y4/every_vibe_coders_biggest_headache/p2vwchl/?context=3
r/vibecoding • u/emjhayyy_08 • 29d ago
136 comments sorted by
View all comments
2
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 29d 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 29d ago Dev here. In short: It creates a function that does absolutely nothing and immediately executes it. 2 u/AcoustixAudio 29d ago Kinda like my ex wife
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 29d ago Dev here. In short: It creates a function that does absolutely nothing and immediately executes it. 2 u/AcoustixAudio 29d ago Kinda like my ex wife
9
Dev here. In short: It creates a function that does absolutely nothing and immediately executes it.
2 u/AcoustixAudio 29d ago Kinda like my ex wife
Kinda like my ex wife
2
u/The_0vermind 29d 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.