@richard what the heck is this

The thing is that you can’t actually use these arrays. For example, if you created an array of a number and some text, it would be of type “string | number” which you can’t really do anything with (in blocks). Unless you are type checking it, which doesn’t exist in blocks, it will cause an error… wait… ok new pxt-JavaScript-extras update, I’ve added the “typeof” block. You can now do type checking in blocks, have fun.

Nope. No fun to be had here. The compiler still complains if you use the block I made, sorry. You would have to go into JavaScript, type “typeof”, and then switch back to make the compiler happy. Very sad.

1 Like