Ide to run a simple Javascript based interpreter, Blink
Official Documentation
Syntax to work with Blink.
Proper spacing is required between keywords.
Each statement should be terminated with semicolon.
Last statement should not be terminated with semicolon.
Keywords
use: The use keyword is used to declare a variable before using it. The variable name follows the identifier rules for Javascript. By default the value is assinged as 0
set: The set keyword is used to set the value of the variable. It is followed by variable name and the value to be assigned.
print: The print keyword followed by variable name prints out in the output area.
if / end: The conditional statements. If condition is true, the lines under it till `end` keyword is found are executed. If condition is false, the statements until `end` are skipped.
Examples
1. Set a value for a variable
use my_Var;
set my_Var 10
This sets the value for `my_Var` as 10.
2. Print age
use age;
set age 20;
print age
It prints the value of the age variable.
3. If expression
use a;
set a 100;
if true;
set a 50;
end;
print a;
As the if condition is true, it executes statements upto end. Therefore, it set the value of a as 50