from Hacker News

Ask HN: Happy numbers in JavaScript that's readable and ESLint-able?

by alansmitheebk on 8/24/17, 12:40 AM with 0 comments

Hi,

I'm trying to learn how to code happy numbers in JS. I've seen a bunch of examples but most are either very difficult to read / understand, use implicity declared global variables, or have really bad style (according to ESLint / D. Crockford).

Can anyone point me in the direction of a readable, clean, not-too-difficult-to-grok happy numbers func in JS?

TIA