Keywords

Bnlang provides a rich set of keywords that can be used in three forms: English, Bangla.
All three map to the same meaning, so developers can code in the style they are most comfortable with.

Control flow

EnglishBanglaDescription
ifযদিConditional branching.
elseনাহলেAlternative branch when condition fails.
switchবিকল্পMulti-case branching.
caseঅবস্থাA specific branch inside a switch.
defaultঅন্যথায়Default branch in switch if no case matches.
forপ্রতিStandard loop.
whileযতক্ষণLoop while condition is true.
doকরুনDo-while loop, runs at least once.
breakথামুনExit from loop/switch.
continueচলুনSkip current loop iteration.
returnফেরতReturn from function.
throwনিক্ষেপThrow an exception.
tryচেষ্টাStart of error handling block.
catchধরুনHandle an error/exception.
finallyঅবশেষেCleanup block after try/catch.

Declarations / Classes

EnglishBanglaDescription
varচলকDeclare a variable (function-scoped).
letধরিDeclare a block-scoped variable.
constধ্রুবকDeclare a constant value.
functionফাংশনDefine a function.
classশ্রেণীDefine a class.
extendsপ্রসারিতExtend a class (inheritance).
superঅভিভাবকCall the parent class.

Operators / Type

EnglishBanglaDescription
typeofধরনGet the type of a variable.
instanceofউদাহরণ_হিসেবেCheck if an object is instance of a class.
inমধ্যেCheck if property exists in object.
ofএরUsed in for...of loops.
voidফাঁকাEvaluate expression without returning value.
deleteমুছুনDelete a property from object.

Async / Generators

EnglishBanglaDescription
awaitঅপেক্ষাWait for an async operation.
asyncঅসমলয়Declare asynchronous function.
yieldউৎপন্ন_করুনYield value from generator.

Miscellaneous

EnglishBanglaDescription
thisএটিCurrent object context.
newনতুনCreate a new instance.
withসাথেExtend scope chain.
debuggerডিবাগারInvoke debugger breakpoint.
staticস্থিরDefine static property/method in class.