From the course: Building Website Interactivity with JavaScript

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Using JavaScript responsibly

Using JavaScript responsibly

- [Instructor] Before we get into writing code and all that fun stuff, I want to start off with a possibly weird thought. Maybe JavaScript isn't the right tool. For the projects we're working on in this course, I would say that JavaScript is the right tool, but when building a website, a feature of a website or any project, I think it's always important to ask, do I actually need JavaScript for this? Can I build this without JavaScript? The more time goes by, the more we can do interesting stuff on the web without a lick of JavaScript. CSS in particular has increased in power in many useful ways that render JavaScript, if not unnecessary, less necessary. With transforms, element and page transitions, key frame animations and more, you can do a lot with CSS that used to require JavaScript. So consider the users you're supporting with your work and whether what you're building actually needs JavaScript. CSS features tend to be very well optimized in web browsers, better than JavaScript…

Contents