This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Katherine Zadyra
Posted Aug 23 - Read on Facebook

Hi everyone! I have a variable called 'linesadded' which is a number, and a function called 'showsummary'. On click I want to execute showsummary function the number of times equal to current linesadded value. What is the syntax for this? showsummary() * {linesadded} or something like this is my guess, this does not give an error but does not work either... Thanks for help in advance :)

2 Comments

Alexander Zapadenko

I would try something like:

for i in [0...linesadded]
Utils.delay 0.5, ->
print "hello"

Benjamin Den Boer

Hiya Katherine Zadyra, you can indeed try using a loop here. You can also inspect the amount of times a function is actually executed by printing it within your loop, while including the loop index.
See → http://share.framerjs.com/cgws9h14m2jm/

Read the entire post on Facebook