Spoken languages are a lot harder to learn than programming languages.
But think about how much faster you learned JS than the time it took to learn C (or whatever your first programming language was.)
Don't forget to account for the vast amount of learned information you get to leverage from your first language, even if you have to unlearn a few things or learn a few new things.
Even though JS is very different from C, learning JS was much, much faster for me than learning C was, because I already knew a whole lot about the way all languages work just from learning C.
I'm learning Icelandic right now, and it only took a few weeks of 30 minutes a day to cover some basic conversational skills, gather maybe 100 or so words of vocabulary, and get an introduction to the basic speech patterns & conjugation. It'll take a lot longer to be fluent, but children take years to get that far, because they're starting from scratch and don't have connections to build on. I see a ton of connections to German and English that kids wouldn't.
It's also hard to compare programming to high school Spanish, since it's easy for us to spend 10 hours a day programming, but in high school we topped out at like 3 hours a week of Spanish exposure, and most of that wasn't practicing very hard.
I moved to Mexico as a child (during my first grade year), and learned enough Spanish to go to school, play with the kids, etc. I feel like I'm picking up languages faster now than I did then.