mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
How did I forget something so basic?
This commit is contained in:
@@ -50,4 +50,15 @@
|
||||
}
|
||||
|
||||
|
||||
//test indexing with variables
|
||||
{
|
||||
var week = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
||||
|
||||
var first = 1;
|
||||
var second = 2;
|
||||
var third = -1;
|
||||
|
||||
assert week[first:second:third] == ["wednesday", "tuesday"], "indexing with variables failed";
|
||||
}
|
||||
|
||||
print "All good";
|
||||
|
||||
Reference in New Issue
Block a user