Recently I gave an interview for the role Sr. Frontend Developer. The Interviewer asked me this question: Q: Square each digit of a given number — 9191 => 811811 Right after seeing the question I started implementing it, using inbuilt JavaScript function this was pretty much easy. Here is the…