by kadfak · 7y ago · 0 comments
let sum = (a, b) => a + b;
actually accepts only arguments of type int, not any numeric type. The + operator is defined as let (+): (int, int) => int;
To have the function accept floats, for example, you would have to use the +. operator like this let sum = (a, b) => a +. b;I guess a clearer distinction between the two can be nice, but then how does that compile to javascript?