Skip to main content
Skip to content

Lists & Objects · Beginner

Lists and Objects Example in Hinglish Code

Creating arrays, accessing elements, checking length, and object properties.

The program

Edit anything and press Run. The output below was produced by running this exact code.

Expected output

Press Run to try it

Kul fal: 4Pehla fal: AamNaye fal ki suchi: [Aam, Kela, Seb, Santra, Amrood]Engine Info: AltFLang Engine v1.0.0Kya active hai?: sahi

How it works

A list (suchi) keeps values in order inside square brackets. lambai counts the items, fal_suchi[0] reads the first one (positions start at 0) and jodo adds a new item to the end.

An object (vastu) keeps named values inside curly braces. You read a field with a dot, as in vishleshan.nama. The + between "v" and the version string joins two pieces of text into one.

Notice that when a whole list is printed, AltFLang shows it in square brackets with commas, and text items appear without quotes.