5 ms·
at first i thought: in a language like javascript, this is could one use for objects; o = {} o[true, true, true] = function(){something} ... and so on then
by hayksaakian 12y ago
at first i thought:
in a language like javascript, this is could one use for objects;
o = {}
o[true, true, true] = function(){something}
... and so on
then do
o[[width, margin_left, margin_right]]()
on second thought:
the biggest strength i see in rust is the wild card, making the switch statement much more useful than in other languages
- userbinator 12y agoJS does not have multidimensional arrays but it does have a comma operator. "o[true, true, true]" won't do what you want.