Morendil comments on Quixey Engineering Screening Questions - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (22)
Actually the brainfart was on my part. I'd forgotten that a common instruction doesn't exist in Javascript, though that hasn't kept some folks from implementing one, as a workaround. (The mind boggles.)
You'll need to specify which version of Javascript to target, since some slightly less obvious solutions may involve version-dependent features.
My current solution is 12 lines long and uses only recursion and function calls and addition and variable assignments.