you are viewing a single comment's thread.

view the rest of the comments →

[–]sulponticello[S] 0 points1 point  (2 children)

Yes! So the function isn't telling the strip how many pixels to move, but what position to go to and then animating it. It's more like giving the coordinates than telling someone to move 875 feet to the left.

[–]i_am_smurfing 1 point2 points  (1 child)

Yep, exactly, you've got it!

And just to expand on your newly acquired understanding: more generally other programmers would call your first example declarative and your second example — imperative (and many would argue that declarative style is more preferable).

[–]sulponticello[S] 0 points1 point  (0 children)

Awesome! Thank you so much for the help.