Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Arrays/8th/arrays.8th
Normal file
14
Task/Arrays/8th/arrays.8th
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[ 1 , 2 ,3 ] \ an array holding three numbers
|
||||
1 a:@ \ this will be '2', the element at index 1
|
||||
drop
|
||||
1 123 a:@ \ this will store the value '123' at index 1, so now
|
||||
. \ will print [1,123,3]
|
||||
|
||||
[1,2,3] 45 a:push
|
||||
\ gives us [1,2,3,45]
|
||||
\ and empty spots are filled with null:
|
||||
[1,2,3] 5 15 a:!
|
||||
\ gives [1,2,3,null,15]
|
||||
|
||||
\ arrays don't have to be homogenous:
|
||||
[1,"one", 2, "two"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue