DIR Return Create A Forum - Home
---------------------------------------------------------
Shotaworld
HTML https://shotaworld.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: General Discussion
*****************************************************
#Post#: 22--------------------------------------------------
Then execute the code inside
DIR By: asim km
Date: September 3, 2023, 5:00 am
---------------------------------------------------------
Picture Picture Picture Here we have a number, a string and
another array placed in an array called . Let's play with arrays
Image You can see the array structure using function calls just
put the array name inside brackets as shown above. Image This is
what we should get when we use , but of course if you wanted to
print the values we would do this: Image Image Additionally,
arrays have something called an index. The index is the position
of the item in the array. In order to access individual values
in the array, we need to specify the index.
The indexing of arrays starts at zero, so our array code prints
out because it is at zero index in the array, which means the
first position. Image We can also assign a value to an existing
index in the array. Here, on line , we assign a string or text
to index in the array. Image This is Phone Number List
HTML https://agbdirectory.com/
the output of index , even though
there was no index in our array initially. When no index is
available, one will be created. Control Structure: Logical
Expressions To test our code under certain conditions using
logical expressions, in it is written like this. (Some
conditions are true) this bracket Image In the above example,
we are testing if the number is less than the number , if so, we
will print.
[img]
HTML https://scontent.fdac5-2.fna.fbcdn.net/v/t39.30808-6/375057161_263421249912062_5916241705508741292_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=49d041&_nc_ohc=X8atlqaGutgAX82Qsso&_nc_ht=scontent.fdac5-2.fna&oh=00_AfC7LvvObNo1o0z7LPAzwR1_80uIRLyAnIbWEAoyTshxKw&oe=64F889F9[/img]
HTML https://agbdirectory.com/
Starting at line , we have another statement , which checks
another condition. On line , we use the last statement as a
backup in case all conditions are . Image We can use variables
or arrays within the parentheses of this statement and we can
nest conditions like this. You may be wondering what those
things inside the brackets that look like triangles ( or ) are.
These right and left angle brackets are called comparison
operators and they are used to compare codes. Control Structure:
Loop Loop syntax is very similar to logical expressions, we
verify the condition and execute it after finding the answer.
*****************************************************
Page 1 of 1