Comment

Comment by solardev

Hey, it's okay. I was in your exact boat a few years ago. Javascript has exploded in popularity in just a few years and yes, the ecosystem is horribly complex. It's an running gag even among full time JS devs how crazy it's gotten. None of us can keep up.

It's OK. Just tackle it one step at a time. Forget Typescript for now. Don't use third party libraries until you need them. Arrow functions are optional. Ternaries are a form of jargon/an optional shortcut.

If the other developer's code is too hard to read, that's okay, set it aside for now and you can come back to it when you have a little more experience.

Start with the problem you're actually trying to solve (which isn't terribly clear, sorry). You have XML and HTML you're trying to parse? Which is it? (XML will be much easier than HTML, because it's much stricter. HTML is notoriously loose, which is why there is only like three real browsers in the world.) What are you trying to do with the parsed input?

Regex probably isn't the best tool to use here. There are specialized parsers for these data formats that we can help you use, if we better understood your needs.

Ask. Ask a lot. Find a mentor if you can. Ask on Stack Overflow if you can't. It's totally okay. Modern JS is a new and exploding field and we're all pretty ignorant about it. Fortunately, 80% of it is relatively easy to learn, and the remaining 20% you can usually ignore or work around. Just take it one step at a time... it's not you. It really just is a chaotic ecosystem.

parent solardev 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton