Instructions Tests Conditionals Create Function Called Stoplight 1 Parameter Lightcolor St Q43793928

java script help
help write this code

Instructions Tests Conditionals Create a function called stopLight • 1 parameter: lightColor – a String that will either be “red” “yellow” or “green” • returns “stop” “slow” or “go” depending on the value of light Color Example function call: stopLight(“red”) //=> returns “stop” stopLight(“yellow”) //=> returns “slow” stopLight(“green”) //=> returns “go” Auto-Run OFF 1 function stopLight(lightcolor) { 2 1/ YOUR CODE BELOW HERE // 6 // YOUR CODE ABOVE HERE // Show transcribed image text Instructions Tests Conditionals Create a function called stopLight • 1 parameter: lightColor – a String that will either be “red” “yellow” or “green” • returns “stop” “slow” or “go” depending on the value of light Color Example function call: stopLight(“red”) //=> returns “stop” stopLight(“yellow”) //=> returns “slow” stopLight(“green”) //=> returns “go” Auto-Run OFF
1 function stopLight(lightcolor) { 2 1/ YOUR CODE BELOW HERE // 6 // YOUR CODE ABOVE HERE //
Expert Answer
Answer to Instructions Tests Conditionals Create a function called stopLight • 1 parameter: lightColor – a String that will eith…
Related