Last active
January 27, 2016 02:41
-
-
Save antonkartashov/b20adcecedd49efe9f91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Цикл от 2 до 20 с шагом 3 | |
for j in [2...20] by 3 | |
x = j * j | |
print x | |
# Цикл от 1 до n, где n — количество элементов в массиве | |
for k in [3, 5, 8, 13, 21] | |
x = k * k | |
print x | |
for text in ['one', 'two', 'three'] | |
x = "number " + text | |
print x | |
for text, i in ['one', 'two', 'three'] | |
x = i + ". number " + text | |
print x | |
for layer, index in sketch.group.subLayers | |
layer.scale = 0.5 | |
# Цикл внутри объекта | |
for name, layer of sketch | |
layer.opacity = 0.5 | |
# Цикл без параметра | |
for [1...5] | |
print "Hello World!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment