Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
# Loop plus half. This code shows how to break out of a loop early
|
||||
# on the last iteration. For the contrived example, there are better
|
||||
# ways to generate a comma-separated list, of course.
|
||||
start = 1
|
||||
end = 10
|
||||
s = ''
|
||||
for i in [start..end]
|
||||
# the top half of the loop executes every time
|
||||
s += i
|
||||
break if i == end
|
||||
# the bottom half of the loop is skipped for the last value
|
||||
s += ', '
|
||||
console.log s
|
||||
Loading…
Add table
Add a link
Reference in a new issue