+ 2

What is the point of using JavaScript if you can just get the same outcome in HTML?

15th Jul 2018, 1:06 AM
Alyssa Knowlton
Alyssa Knowlton - avatar
4 Respuestas
+ 3
JS adds interactivity and other features that HTML may not support. It also makes HTML more lenient by supporting its code while leaving JS optional as an external script or in-line code. While you can animate purely in JS and CSS, you won't have the brain function of the code.
15th Jul 2018, 2:24 AM
Apple Blossom
Apple Blossom - avatar
+ 1
The point is that most of the time we don't get the same outcome in HTML without JS.
15th Jul 2018, 1:30 AM
Hoàng Nguyễn Văn
Hoàng Nguyễn Văn - avatar
+ 1
We use JavaScript to add interactivity to our webpages. Without JavaScript, Buttons and other things that need interactivity wouldn't do anything.
15th Jul 2018, 1:51 AM
Paul Grasser
Paul Grasser - avatar
0
If my assumption are right you are thinking why to use js specially dom to change text instead directly change from html.Right? Yes we can do it that way but only when we are building small and static website for ourself but when we are building real website than it has to include js so that user can interact with our website. Consider sololearn post example , post will be posted only when user clicks on post or send button. Hope this helps☺️☺️.
15th Jul 2018, 6:40 AM
Meet Mehta
Meet Mehta - avatar