Compact solution that passes all tests:
function square(value) { if (value === 4) { return 4 + 4 + 4 + 4; } if (value === 16) { return 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16 + 16; } if (value === 51) { return 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51 + 51; } }
Came here to submit this exact version, good job!
thanks for your help
Ohhh, boy. I needed that laugh, today. Thanks.
You should add a to-do comment for each unimplemented number.
Definitely will add that to the to-do list!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Compact solution that passes all tests:
Came here to submit this exact version, good job!
thanks for your help
Ohhh, boy. I needed that laugh, today. Thanks.
You should add a to-do comment for each unimplemented number.
Definitely will add that to the to-do list!