Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

notation to acces section/part of an array

otaolafrotaolafr Member Posts: 113 EDU
hello,
I am trying to recover a part of an array,
for example 
var x = [1,2,3,4,5,6] // x is [1,2,3,4,5,6]
how can for example extract the array of the two elements from the third to the fith
something like:
var partX= x[2..4] // partX is [3,4,5]
I tried x[2..4] , x[2:4] without luck
I couldn't find this in the documentation (at least here https://cad.onshape.com/FsDoc/variables.html#array)

Tagged:

Comments

Sign In or Register to comment.