A fun, beginner-friendly, desi-style programming language built on top of JavaScript. With syntax inspired by casual Hindi phrases, Babu Language makes programming more relatable and enjoyable. Created by Atikin Verse.
Snippets
This is simple code snippet extension for Babu Language projects.
🧠 Babu Syntax
💻 JavaScript Equivalent
bol babu "Hello"
console.log("Hello")
bol babu x + y
console.log(x + y)
le babu x = 5
let x = 5
const babu y = 10
const y = 10
var babu z = 15
var z = 15
agar babu (x > 3)
if (x > 3) {
nahi to babu
} else {
jab tak babu (x < 5)
while (x < 5) {
kaam babu greet(name)
function greet(name) {
wapis jao babu x * y
return x * y
kaam khatam babu
}
bula babu greet("Babu")
greet("Babu")
sahi babu
true
galat babu
false
padho file "data.txt"
fs.readFileSync("data.txt", "utf-8")
likho file "out.txt", "hello"
fs.writeFileSync("out.txt", "hello")
galti ho sakti hai babu
try {
pakdo babu (err)
} catch (err) {
koi ghalti babu "message"
throw new Error("message")
event babu click = bol babu "ok"
click = function() { console.log("ok") }
Features
Custom syntax with Indian flair
Easy-to-use CLI tool
VS Code extension for syntax highlighting and snippets
🧠 Feature
💻 Description
Print Statements (bol babu)
Print messages or values to the console using console.log.
Variable Declaration (le babu)
Declare variables using let, const, or var.
Conditional Statements (agar babu)
Use if-else conditions for logical branching.
Loops (jab tak babu)
Create while loops for repeated actions based on a condition.
Function Declaration (kaam babu)
Declare functions with or without arguments.
Return Statements (wapis jao babu)
Return a value from a function.
Error Handling (galti ho sakti hai babu)
Handle errors with try-catch blocks.
Boolean Literals (sahi babu, galat babu)
Use true and false for boolean logic.
File Read (padho file)
Read a file synchronously using Node.js fs.readFileSync.
File Write (likho file)
Write data to a file synchronously using Node.js fs.writeFileSync.
Event Handling (event babu)
Handle events (e.g., click) by defining functions for them.