What is Javascript?

I suppose it’s your first time trying to read about how to code, unfortunately we will not talk about that. First of all you need to understand why JS is important and how to use JS in your daily routine.

When I started coding in JS, I realised that J…


This content originally appeared on DEV Community and was authored by Manu Martinez

I suppose it's your first time trying to read about how to code, unfortunately we will not talk about that. First of all you need to understand why JS is important and how to use JS in your daily routine.

When I started coding in JS, I realised that JS bring some new features and facilities than other languages, it's allow me to learn about algorithms and practice creating complex algorithms and run it easily with one command. Sincerely, I love JS and I usually use it when I want to learn using learning-by-doing paradigm. So, I strongly recommend you do the same as me, please you should love :).

Use cases
Javascript is a text-based programming language used both on the client-side and server-side that allows you to make web pages interactive. OMG!!! client & server side, you could think that JS is the unique programming language you need to know as a developer, but NO 🥲 , JS is like a tool which you will use to fulfill some requirements for a specific task. Then, what's exactly client & server side?

Client side
A dev beside a website,client side representation

JS is usually used to allow you make interactive and modern websites, you can create HTML and prepare actions for each HTML element, it's can be really amazing since you can detect click on buttons and make different actions trying to improve UX. Here, there is some example code:

// detect click on some button
button.addEventListener("click", (ev) => {
   // make here your actions to make web page interactive
)};

Server side
A mobile phone besides a server, server side representation

JS is usually used with Node JS to create the most complex API with different models and different types of DDBB, getting from SQL as MySQL until NO-SQL as MongoDB

// detect get request
app.get(`${basic_uri}/customers`, customerController.getCustomers);

// controller function, located in other file
const getCustomers = (req, res, next) => {
  //make query to ddbb
}

As you can see above JS is a dynamic typed language, it's mean that data types are processing during execution time, so you will not worry about data types and how to use it. This is the reason why I really recommend JS as a first programming language since you can focus on algorithms and logic. Moreover, you have already seen that JS sintaxis is really clear and easier than other similar languages, maybe it's another reason to choose JS as a first programming language.

I hope you are enjoying reading the first post about JS, it's really important understand the use cases and how to work with JS. In the following posts we will talking about more exiting and difficult topics with more example code.


This content originally appeared on DEV Community and was authored by Manu Martinez


Print Share Comment Cite Upload Translate Updates
APA

Manu Martinez | Sciencx (2021-11-23T11:18:04+00:00) What is Javascript?. Retrieved from https://www.scien.cx/2021/11/23/what-is-javascript-2/

MLA
" » What is Javascript?." Manu Martinez | Sciencx - Tuesday November 23, 2021, https://www.scien.cx/2021/11/23/what-is-javascript-2/
HARVARD
Manu Martinez | Sciencx Tuesday November 23, 2021 » What is Javascript?., viewed ,<https://www.scien.cx/2021/11/23/what-is-javascript-2/>
VANCOUVER
Manu Martinez | Sciencx - » What is Javascript?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/23/what-is-javascript-2/
CHICAGO
" » What is Javascript?." Manu Martinez | Sciencx - Accessed . https://www.scien.cx/2021/11/23/what-is-javascript-2/
IEEE
" » What is Javascript?." Manu Martinez | Sciencx [Online]. Available: https://www.scien.cx/2021/11/23/what-is-javascript-2/. [Accessed: ]
rf:citation
» What is Javascript? | Manu Martinez | Sciencx | https://www.scien.cx/2021/11/23/what-is-javascript-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.