Hi, I’m hoping for some clarification on my use of .splice in a Code Playground snippet.
I want to remove the middle element from a 3 element array, like so:
At index 1, remove 1 element, and add nothing.
But this results in an error, with the blank third argument highlighted
According to the glossary, the third argument for
.splice can be left blank to delete without adding.
I’ve tried using null for the third argument, but that adds null to the array, rather than resulting in a two element array that I’m looking for.
Perhaps this is a difference in implementation between Grasshopper and JS/ECMA in the wider world. Even more likely, I’m missing something…
For reference, I’ve completed both Fundamentals courses, but the Array section is still locked for me. Just trying an idea on my own to see what happens.
Thanks for any insight you can share!