JavaScript intro

We mainly use JavaScript to create

  • websites
  • web applications
  • server-side applications using Node.js

but JavaScript is not limited to these things, and it can also be used to

  • create mobile applications using tools like React Native
  • create programs for microcontrollers and the internet of things
  • create smartwatch applications

JavaScript is a programming language that is:

  • dynamically typed: a variable does not enforce a type. You can reassign any type to a variable, for example, assigning an integer to a variable that holds a string.
  • loosely typed: as opposed to strong typing, loosely (or weakly) typed languages do not enforce the type of an object, allowing more flexibility but denying us type safety and type checking (something that TypeScript – which builds on top of JavaScript – provides)
  • interpreted: it’s commonly known as an interpreted language, which means that it does not need a compilation stage before a program can run, as opposed to C, Java or Go for example. In practice, browsers do compile JavaScript before executing it, for performance reasons, but this is transparent to you – there is no additional step involved.

A little bit of history

1b_JS_introductie