Menu

Post image 1
Post image 2
1 / 2
0

I Left Go for JavaScript After 3 Months (Yes, I'm Insane)

DEV Community·Benjamin Koimett·22 days ago
#rKwwr04k
#day#javascript#go#learning#regex#loops
Reading 0:00
15s threshold

I learned Go for three months. Made a few CLI tools, wrestled with pointers, felt smart. Then I switched to JavaScript… a week ago . Yesterday I finally understood for loops and regex. Today I'm writing this article instead of crying. Here's what the journey has been like so far. Spoiler: my brain hurts, but I'm laughing. Day 1: "Wait, no types?!" In Go, you write: var age int = 25 Enter fullscreen mode Exit fullscreen mode In JavaScript, you write: let age = 25 ; // cool age = " twenty five " ; // still cool?! Enter fullscreen mode Exit fullscreen mode I stared at my screen for 5 minutes. No compiler yelling? It felt like a teacher leaving the classroom. Pure chaos. Then I tried "2" + 2 and got "22" . Go would never. JavaScript is like that friend who says "yeah sure whatever" to everything. Day 3: Loops… finally loops I know loops from Go. for i := 0; i < 10; i++ – simple. JavaScript has: for for...in for...of forEach map I asked my roommate which one to use. He said "depends". I said "depends on WHAT".…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More