Nothing. It even has a pretty bad runtime complexity ;-)
You should probably read a few more solution down to see other solutions.
This is very nice but seems hard to read. What makes it a best practice?
typeof e == typeof b You nailed it in one go! :) I did it poorly
typeof e == typeof b
This comment is hidden because it contains spoiler information about the solution
certainly not a best practice. clever, yes
This is clever, but I don't know why anyone would vote for a nested ternary as a best practice
Mine is shorter ;D
best solution! zero in the end is very readable!) but "a" as solo condition I would change to most readable "a != null"
...(x = y)... is a hack to compute smth in 1 line (and no to use new variable)
So the w in comparisons to the right contains the result.
And w/(h^2) is the BMI from the task.
You could probably remove one of those arguments in the map lambda. Other than that--pretty keen
Interesting solution. I don't quite understand what the assignment operator is doing in (w = w / h / h). Do you mind explaining?
(w = w / h / h)
Shouldn't store a functional expression in a mutable variable (let). Use const instead as a general rule.