Syntax Guide

A comprehensive guide to BanglaCode keywords and structure.

Keywords Table

KeywordMeaningEquivalent
dhorohold/varvar/let
jodiifif
naholeelseelse
jotokkhonwhilewhile
dodo once then loopdo...while
ghuriyeloopfor
ofiterate valuesof
inproperty/index checkin
instanceofinstance checkinstanceof
deletedelete key/indexdelete
kajworkfunction
utpadanproduceyield
feraoreturnreturn
dekhosee/printprint

Variables

Variables are declared using dhoro. BanglaCode is dynamically typed.

dhoro name = "Rahim";
dhoro age = 24;
dhoro isStudent = sotti; // true

New Core Syntax

do {
  dekho("run once");
} jotokkhon (mittha);

dhoro obj = {a: 1};
dekho("a" in obj);
delete obj.a;

kaj* count(max) {
  utpadan 1;
}

dhoro double = x => x * 2;
dhoro [a, b] = [10, 20];