Gor is interpreted programming langauge made with Golang. It has similar syntax to that of JavaScript.
- Language has 5 datatypes: number, string, null, object, array.
let a = 10
const b = ""
print(a)
+, - , *, / , &, |
==, <=, >=, !=, &&, ||
let a = [10, 2]
print(a[0])
const b = {
hi: 10
}
print(b.hi)
- Functions can be declared using
fn
keyword
fn myFunc(a, b) {
return a + b
}
myFunc(10, 20)
- Currently, the only loop Gor supports is the for loop.
for (let i = 0; i < 10; i = i + 1) {
print(i)
}
- While loop
- Unary operators (
--
,++
) - Multithreading