Jackal

Introduction

01

Variables: let & const

Jackal uses block-scoped declarations. 'let' is for mutable data, while 'const' ensures a fixed reference.

spec_manifest.jk
let score = 100
const VERSION = 1.0

score = 150
VERSION = 1.1
02

Null Handling

Manage null references efficiently using the logical OR operator.

spec_manifest.jk
let b = null
let a = b || "jack"

println(a)
03

Collections: Array & Map

Structured data storage for complex logic.

spec_manifest.jk
let list = ["A", "B", "C"]
let user = {"id": 1, "name": "Jack"}

println(list[0], user["name"])
04

Output Functions

Output is handled via print and println using comma separation.

spec_manifest.jk
let status = "Active"
println("System Status:", status)
05

Functions

Functions are defined using the 'func' keyword. They support parameters and return values to encapsulate logic.

spec_manifest.jk
func greet(name) {
    println("Hello,", name)
}

func multiply(a, b) {
    return a * b
}

greet("Engineer")
let result = multiply(10, 5)
println("Result:", result)
← Return to Index Technical Documentation