How do I iterate over a digit and then get my program to print out each digit that I iterate over in javascript?

I am eventually going to use this program to write a program that squares the digits

1 Like

You already should know how to iterate over a string of characters, so use this to your advantage. Please show your attempt to write the code first. Before even writing any code, make sure you write out your algorithm, so you understand all the steps needed to accomplish the task.

1 Like

Here you go bud,

The solution to your problem: