I'm trying to figure out which language is better for building a personal website: JavaScript or TypeScript. Some folks claim JavaScript is easier because it's simpler, while others think TypeScript is better since it addresses some of the issues with JavaScript and has a type system. I've got some programming experience; I started with Python last December and have been learning C since March. I'm not looking to make a career in web development, but I think your feedback would help me make an informed decision since you all have more experience in this field.
5 Answers
TypeScript all the way! Plain JavaScript feels a bit too basic for anything substantial. It’s definitely sought after in the industry too, so it’s worth investing your time in.
Both JavaScript and TypeScript ultimately let you achieve the same results, but they come with different experiences. If you just need a simple personal site, JavaScript is totally fine. However, if you're working on something that might involve API calls or you want to minimize errors in a larger project, I'd choose TypeScript. It enforces type safety, which helps catch mistakes early.
For me, TypeScript is the winner! Having types helps clarify what's going on in your code at a glance. But if you're just getting started and want something straightforward, go with JavaScript. It's less boilerplate, and for a simple site, it might be all you need.
I'd definitely recommend learning TypeScript! It really builds on JavaScript and adds a nice type system. After working with TypeScript, going back to JavaScript can feel a bit messy because of the lack of types. If you're aiming to learn, TypeScript is the way to go for its extra structure and error-checking.
Honestly, for a personal website, you might not need either JavaScript or TypeScript. Consider using a static site generator like Hugo or just plain HTML/CSS. If all you want is a portfolio or maybe a blog section, this could simplify things a lot, and you could still host it easily on GitHub Pages!
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String