JS Features - Why JS will be the future? :)
Tags: javascript, programming, functional, beginners
Published: 2021-11-23 21:03:35

**Javascript**, I am sure you have been heart about it, it one of the most commented programming language, for instance, 
> JS looks really easy to learn. 

All this staff is the main reason why JS acceptance is growing exponentially, I should say you, *you must learn JS 🤩*, however, why?

1. JS is really easy to learn: Yes 😏, easier than other programming language, normally, you will be able to learn it in one or two weeks, his sintaxis looks petty sugar, it's such **jam** 😜

![Javascript syntax.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637517300143/IKJfXRL2o.png)

```js

const computeDNILetter = (dni) => {

    // separamos las partes del dni
    const dniParts = dni.split('-');

    // comprobarmos el valor
    if (Number(dniParts[0]) > 0 && Number(dniParts[0]) <= 99999999) {

        //obtenemos el indice de la letra
        const theoricalLetter = Math.floor(Number(dniParts[0]) % 23);
        // obtenermos la letra
        const letter = letrasDNI[theoricalLetter];

        //comprobamos las letras
        if (letter.toLowerCase() == dniParts[1].toLowerCase()) {
            return 'DNI y letra correctos';
        } else {
            return 'Error, su letra no es correcta';
        }

    } else {
        return 'El dni introducido no es correcto';
    }

};

```
I am sure you have not understood anything, but do not worry, only you have to focus in JS sugar sintaxis 🧐.

2. You can use JS to interact with DOM. **Yes**, you will be able to create HTML structures from JS and create listeners to act for different user actions, like click on a button. 

![Js DOM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637517311455/sF1B6ArTR.png)

``` js
//crear evento
input.addEventListener("keyup", ev => {
  if (ev.keyCode == 13) {
    console.log("Estamos cambiando el evento");
    //TODO: REFACTORIZAR
    for (let value of container.childNodes) {
      console.log(value);
      value.innerHTML = `<h1>${input.value.toUpperCase()}</h1>`;
    }
  }
});
```
Also, Javascript allows you to work from a server or client side, as I explained you in **past posts**, it makes JS really versatile, you only need to learn one programming language to be a *Full Stack web developer*, yes **you should start learning JS right now. **

It's not all, it also is compatible with all **CMS** such *Wordpress, Prestashop, Magento, Shopify*, you can use JS wherever you want, only you will have to apply different programming paradigms to accomplish the different goals you can have. I recommend you start learning JS after reading this Post, the time does not stop and you do not know JS yet 😤.

I am thinking to start a JS course for everyone who want to learn JS without any **programming experience**, we need to create a group of five people to start coding and learning right now 🥰. I will open 5 seats in my JS school, if you are interested in being one of these people who will code with JS like seniors please leave a comment in this post, I will reach you out with more details about it. 

I hope you have been **enjoyed** reading this post 😜.