What is JavaScript?

JavaScript is one of the most powerful and important programming languages ​​today, due to three clear approaches: it is useful, practical, and it is available in any web browser.

JavaScript is created by Brendan Eich and saw the light in 1995 with the name of LiveScript, which was later named JavaScript, it was born as a simple language destined to add some interactive characteristics to web pages. However, nowadays, it has grown rapidly and is the programming language that is used in almost every website in the world.

The power of JavaScript is available mainly on the frontend side, adding more interactivity to the web, you can also use the libraries and frameworks such as jquery, angular, backbone, react and others, written on JavaScript, and that help you create a better experience user on our websites. In the same way, JavaScript can be used on web servers. Node.JS is your best option to use this language on the server-side.

  1. Let’s now know the JavaScript features that you make of this language, one of the most popular today.
  2. It is light.
  3. Multiplatform, since it can be used on Windows, Linux or Mac or in the browser of your choice.
  4. It is Imperative and structured; by means of a set of instructions, it tells the computer what task it must perform.
  5. Prototyping, because it uses prototypes instead of classes for the use of inheritance.
  6. Object and event-oriented.
  7. It is Interpreted, it is not compiled to run.

These are the characteristics that make javascript a language that allows you to develop giant and powerful applications, such as: google doc, facebook, twitter, and even capable of running on the server as a very fast webserver, thanks to nodejs.

Variables:

They are containers in which the values ​​are stored. It is declared with the expression ‘var.’ Variables are assigned values ​​and can be of various types:

  • String: or text strings
  • Number: or numbers
  • Boolean: have values ​​of true or false
  • Array: stores multiple values ​​in a single reference
  • Object: a generic variable type that supports almost any value

Operators:

Symbols that act on 2 values ​​or variables to produce different results. Some of the simplest operators are:

  • Sum or concatenation: add or join different strings +
  • Subtraction, multiplication or division: add, subtract or multiply – * /
  • Assignment operator: assign a value to a variable 0 =
  • Identity / Equality: checks if two values ​​are equal to each other and returns a Boolean value (true / false) ===
  • Denial (not equal)

Conditionals:

It is normally represented by the if… else structure and allows you to check whether an expression returns ‘true’ or not and, depending on the response, it throws one result or another. In these types of expressions, it is the criterion, which is always associated with 2 blocks.

If the if criterion returns the answer ‘true’ in response, the first block is thrown, if the answer is ‘false,’ the second block that goes after ‘else’ is thrown.