Here it is you guys!
What in the world is a ālocal groupā
Looool sry! I mean the stuff you can add in functions!
ā¦types?
I failedā¦
60%⦠I barely passedā¦
(Also, whatās the answer for the last question?..)
Hehehe⦠yep, itās you lol.
If you meant types then your answer is wrong⦠Technically there are infinite types since you can write your own classes which can then be typed to the parameters in functions.
If youāre refering to default built-in typescript types then you have
- string
- number
- Array
- boolean
- any
- object
- function
- Enum
And with MakeCode on top you also have Image, TileMapData, Buffer and so on. Basically, itās going to be a lot more than 6 types If you want to fix this, itās up to you, Iād honestly change the whole question due to just how hard it is to really answer (since there are practically infinite types), but you donāt have to, mistakes happen!
Woahhhhhhhh⦠ok, I had no idea lol! I just made a function, and there are six options so I put it as that. So thereās an infinite amount? Mr. @Sarge knows a lot about parameters in fonctions.
functions*
I mean I said infinite since you can make infinite classes that can serve as types yourself, but even with the built-in types, you can make infinite types.
For example, you might have an array of numbers (number[]
), but you can also have an array of number arrays (number[][]
). You can stack this infinitely* with any type, and since each of those is considered a type, you can say there are infinite types.
Now, obviously this is a really strange way of looking at this, and it makes sense whyād you get it wrong, itās confusing! Iām glad you learned something new
* Technically not āinfiniteā, JS most likely has a limitation to this