When is the real need to use JavaScript? [closed]

-3

I'm new to the development world, and I started with the Front End. I've been looking to specialize in HTML, CSS and especially JavaScript, but over time I've come to realize that with the advancement of these languages, and specifically CSS in its 3rd generation already can, alone, make several visual effects that were previously only possible with JavaScript (a slider or any other type of animation). In such a way, I still came across few situations where JavaScript is really needed, such as opening a modal or a form validation, for example. On what occasions is JavaScript really necessary, not just optional? The language runs the risk of being replaced in fact by CSS, or there are still a large number of cases where only JS can perform a task (either a visual effect or not).

    
asked by anonymous 27.07.2015 / 12:45

1 answer

1

No, javascript will never be replaced by CSS simply because they are two different worlds. CSS is not a programming language.

Instead of talking, talking and talking here a lot of thing and do not pass my opinion, I will teach you a business: Enter any website (Facebook, for example) by Google Chrome. Press F12 to open Developer Tools. In the bar where you have the tabs, at the end, click on the configuration gear. In GENERAL, check the "Disable Javascript" box and refresh the page. This will cause the site to load without javascript. I guarantee it will not be a beautiful thing to see!

Javascript will serve so many things ... Mainly because, because it is a programming language, it will allow chain commands, procedurally. CSS does not.

When you start learning javascript, you'll see how important it is. Currently, all the sites I develop have at least 4 script calls in and sometimes some internal ones as well.

    
27.07.2015 / 12:59