Jo Programming Language

A toy programming language built with golang. (Syntax Same like javascript)


Usage

[email protected]:~$ go run main.go example.jo

or

[email protected]:~$ ./jo example.jo

Sample Program

name = "Pratham";

if (name == "") {
    name = "World";
}

helloworld = "Hello, " + name;

// Printing Hello, World
print(helloworld);

// Print if number is even or odd from 0 to 10
for ( i = 0; i <= 10; i = i + 1 ) {
    if ( i % 2 == 0 ) {
        print("is even " + i);
    } else {
        print("is odd " + i);
    }
}

GitHub

View Github