1. Home
  2. Docs
  3. NectarJS
  4. Learn JavaScript

Learn JavaScript


Variables are like “boxes” that stock a value.

Variables and values

In JavaScript you don’t have to specify what type of value you want to store, you just have to declare it :

1. var aString = “Hello !”;
2. console.log(aString);

Console is an object. We will see this later console.log let’s you print on the console a variable or a value.

Here our program should output : Hello !

Create a new folder and a new JS file in it and try to compile and run it with NectarJS :

nectar myfile.js --run

Was this article helpful to you? Yes No

How can we help?