Your function

Report a typo

Write the function with the name myFunc() where you create the counter variable i and use it inside a for loop. In the loop, print out all the cubes of numbers from 1 to 5.

Think about which kind of identifier is more appropriate here.

Also, make sure your code defines the function but doesn't call it.

Sample Input 1:

Sample Output 1:

1
8
27
64
125
Write a program in JavaScript





___

Create a free account to access the full topic