DEV Community

hamzajadoon
hamzajadoon

Posted on • Edited on

JavaScript

JavaScript helps you build amazing websites features and how it makes interactive websites such as Maps, 2D/3D animations, etc. it works with CSS and HTML in making complex websites, recently JS released ES6 version which has replaced ES5 in a better way Some of the built-in functions in ES6 helps in making the code short and simple to read, for instance, Arrow Function which is a comprehensive way to write function expressions that have a lot of details but are brief.

You can write an arrow function like this,(=>). Below I will show a very simple example of an arrow function which will show the difference between ES5 and ES6 and you will see how it makes everything so easier.
ES5 syntax: const add = function(x,y) { return x + y; };
ES6 arrow function: const add = (x,y) => { return x + y; };
Or even simpler: const add = (x,y) => x + y;

This is just one example that I wanted to share but there is so much to learn about JavaScript and create really cool websites. APIs is an exciting functionality that is ready-made blocks of codes built to use in this client-side language allowing developers to implement programs that harder to implement. Browser APIs are already built in your web browser that can be useful to make complex things, for example, The DOM (Document Object Model) API allows you to handle HTML and CSS, creating, removing, and changing HTML, dynamically applying new styles to your page, etc. Every time you see a popup window appear on the page or some new content displayed, that's the DOM in action.

Finally, I want to talk about something which I have experienced myself and I am sure so many people go through it and that is, getting stuck on choosing a way of learning, I personally think every way of learning is helpful it all depends on the person. I prefer watching videos and then implementing what I have watched.

Top comments (0)