Arrays
An array is a data type that can store multiple values in a single variable, and it is used to represent a list of values, values can be of any data type.
Syntax
An array is defined by a sequence of values surrounded by square brackets []
, and the values can be any data type, and they are separated by a comma ,
.
Examples
~main<argc><argv>{<
names = ["Ahmed", "Mohammed", "Ali"];
ages = [20, 21, 22];
persons = [
["Ahmed", 20],
["Mohammed", 21],
["Ali", 22]
];
println<format<"{}, {}, {}"><names><ages><persons>>;
>}
Indexing
Soon
Slicing
Soon