‘use strict’;

let x = getWeight()

let y = targetPlanet()

let finalWeight = 0;

switch(y)

{

case “Mercury”: finalWeight = calcMercury(x,y);

break;

case “Venus”: finalWeight = calcVenus(x,y);

break;

case “Earth”: finalWeight = calcEarth(x,y);

break;

case “Moon”: finalWeight = calcMoon(x,y);

break;

case “Mars”: finalWeight = calcMars(x,y);

break;

case “Jupiter”: finalWeight = calcJupiter(x,y);

break;

case “Saturn”: finalWeight = calcSaturn(x,y);

break;

case “Uranus”: finalWeight = calcUranus(x,y);

break;

case “Neptune”: finalWeight = calcNeptune(x,y);

break;

case “Pluto”: finalWeight = calcPluto(x,y);

break;

}

outdata(finalWeight,y);

function getWeight () {

let weight = Number(prompt(‘Enter your current weight’));

return weight;

}

function targetPlanet() {

let planet = prompt(‘Enter a solar planet’);

return planet;

}

function calcMercury(weight,planet) {

let mercury = 0.378;

if(planet===‘Mercury’) {

let newWeight = weight * mercury;

return newWeight;

}else{

}

}

function calcVenus(weight,planet) {

let venus = 0.907;

if(planet===‘Venus’) {

let newWeight = weight * venus;

return newWeight;

} else{

}

}

function calcEarth(weight,planet) {

let earth = 1;

if(planet===‘Earth’) {

let newWeight = weight * earth;

return newWeight;

} else{

}

}

function calcMoon(weight,planet) {

let moon = 0.166;

if(planet===‘Moon’) {

let newWeight = weight * moon;

return newWeight;

} else{

}

}

function calcMars(weight,planet) {

let mars = 0.166;

if(planet===‘Mars’) {

let newWeight = weight * mars;

return newWeight;

} else{

}

}

function calcJupiter(weight,planet) {

let jupiter = 2.36;

if(planet===‘Jupiter’) {

let newWeight = weight * jupiter;

return newWeight;

} else{

}

}

function calcSaturn(weight,planet) {

let saturn = 0.916;

if(planet===‘Saturn’) {

let newWeight = weight * saturn;

return newWeight;

} else{

}

}

function calcUranus(weight,planet) {

let uranus = 0.889;

if(planet===‘Uranus’) {

let newWeight = weight * uranus;

return newWeight;

} else{

}

}

function calcNeptune(weight,planet){

let neptune = 0.071;

if(planet===‘Neptune’) {

let newWeight = weight * neptune;

return newWeight;

} else{

}

}

function calcPluto(weight,planet) {

let pluto = 0.071;

if(planet===‘Pluto’) {

let newWeight = weight * pluto;

return newWeight;

} else{

}

}

function outdata(newWeight,planet){

alert('Your weight on ’ + planet + ’ is ’ + newWeight +"!");

}

CAN SOMEONE HELP ME AND PLEASE TELL ME WHERE I WENT WRONG AT. WHEN I RUN MY CODE THE WEIGHT FOR EACH PLANET RETURN AS 0 WHY IS THAT?