this post was submitted on 24 Mar 2026
21 points (92.0% liked)

Programming

26196 readers
347 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

Hello,

I am thinking about teaching my students JavaScript first so that they can start creating websites and make their career, what are your thoughts?

you are viewing a single comment's thread
view the rest of the comments
[–] kibiz0r@midwest.social -2 points 11 hours ago (1 children)

JS for sure.

It has a reputation among programmers as being a bit of a mess, but I think the reasons behind that reputation are largely irrelevant to your use case.

Basically:

  1. It has some bad decisions about basic stuff, like truthiness, equality, coercion. But those aren’t major stumbling blocks, really. When they run into those situations, they’ll probably already be aware that they’re trying something weird and won’t have the same already-developed intuition about “how it should work” that many of us are bringing to the table.
  2. Production deployment can easily turn into a Rube Goldberg machine. I think this is mostly what the kneejerk “really? JS?” response is about. Different ES versions, module systems, WASM, dependency hell, transpilers on top of transpilers, and a billion different runtimes. And the fact that everyone and their grandma apparently wants to build a custom DSL on top of JS that requires additional transpiler plugins or codegen steps. But your students won’t have to worry about that shit. Just pick one environment and do that. Maybe warn them that stackoverflow might use different syntax (require vs import) or try to import stuff that doesn’t exist in their environment though.
[–] nykula@piefed.social 2 points 10 hours ago

If there's a need to introduce students to virtual DOM, I'd choose a library that doesn't require language extensions or editor plugins, but allows to easily code with just the syntax of JS itself: properties as Plain Old JavaScript Objects, map/reduce with arrow functions, ternary operator, variables as usual, components as functions. Adding Mithril to existing WordPress websites for making dynamic parts such as calculators or quizzes was quite straightforward. On the other hand, its API is somewhat less convenient than what React offers.