tracks

Codecademy

Iniciar Sesión Crear una cuenta
Ajax-loader-large-white
1/10
How To Make JS Your Own
Numerical Anomaly

Did you know that 88 squared plus 33 squared equals 8833? How about the fact that 990 squared plus 100 squared equals 990100? The question is, are there any other two-digit numbers that share this same type of relationship? We can actually use JavaScript to figure this out!

Looping

We are going to start off by learning about loops. The reason we want to use a loop is because we want to try out all combinations for all of the two-digit numbers.

Instrucciones

The loop shown currently loops through all of the two-digit numbers. Unfortunately, it doesn't yet show any of them to use so that we can confirm that it actually is looping through all of them. Uncomment line 2 that we can confirm that all of the numbers actually display. Click Save and then Run to try out your JavaScript code.

?
Atascado? Consiga una indicio! Indicio

Remove the two forward slashes in order to uncomment the call to console's log() function.

script.js
Back to Editor

Iniciar sesión en Codecademy