Solar system

Report a typo

You have an array of planets:

const planets = ["Earth", "Jupiter", "Neptune"];

Complete a showPlanets function below to display the name of each planet via the console.log.

Sample Input 1:

Sample Output 1:

Earth
Jupiter
Neptune
Write a program in JavaScript
const planets = ["Earth", "Jupiter", "Neptune"];

function showPlanets(planets) {
// write your code
}
___

Create a free account to access the full topic