Need optimisation help

Feel free when you have some time to check out the Make for Make Newbies video series which includes a run through of ALL the array functions – including slice(). There is a lot to (ab)use there no doubt! :slight_smile:

@samliew very clever use to add the initial {{null}} to the add() function for the edge case where all of the cases are true and you still want to slice starting with the second element of the array.

slice() is odd because the first element of an array is set to 0 rather than 1, so 1 is actually used to extract the array elements starting with the second element.

1 Like