I thought I knew JavaScript.
dev.to·13h·
Discuss: DEV
🟨javascript
Preview
Report Post

I had studied:

  • arrays and objects
  • loops and conditionals
  • destructuring
  • string methods
  • even map, filter, reduce

But every time I opened a “simple” problem, my brain froze.

Not because of syntax.

Because I didn’t know how to think.

The mistake I kept making

I was asking:

“What code should I write?”

Instead of:

  • What is the input?
  • What shape should the output have?
  • Am I counting, grouping, or transforming data?
  • Should the result be {} or []?

That single question — {} or [] — blocked me more times than syntax errors ever did.

The moment things clicked

I stopped rushing to write code.

Before touching the keyboard, I started writing this in plain English:

  • “I need to group items by X”
  • “I need to count how many…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help