Skip to main content
Participant
February 12, 2024
Answered

Question about expression (i'm a beginner)

  • February 12, 2024
  • 1 reply
  • 200 views

Hello i just started reading a book called "The power of expression" and in a example they use the index like this:

offset = 150;
[position[0]+offset*index,position[1]];

i just wanted to know why they put de 0 and the 1 in semicolon.

This topic has been closed for replies.
Correct answer Dan Ebberts

position[0] is the x postion and position[1] is the y position. Is that what you're asking?

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
February 12, 2024

position[0] is the x postion and position[1] is the y position. Is that what you're asking?