Make while() handle break
This commit is contained in:
1 parent
d8672e1b2a
commit
10477fc2d4
2 files changed
+5
-1
No files matched your search
@@ -226,6 +226,10 @@ null
|
||||
1
|
||||
[1,2,4,8,16,32,64]
|
||||
|
||||
[while(.<100; .*2|if . > 10 then break else . end)]
|
||||
1
|
||||
[1,2,4,8]
|
||||
|
||||
[foreach .[] as $item ([3, null]; if .[0] < 1 then break else [.[0] -1, $item] end; .[1])]
|
||||
[11,22,33,44,55,66,77,88,99]
|
||||
[11,22,33]
|
||||
|
||||
Reference in new issue
Block a user