5 pts Create a function that will return the product (multiplication) of a given number multiplied by 2 if the given number is even, or multiplied by 5 if the given number is odd. Then return the updated number. Example: conditionalMultiplication(4) should return 8 because 4 is an even number, therefore, it should be multiplied by 2. You can assume the number will not be 0.
function conditionalMultiplication(num){ //Enter your code below }
Test Cases:
  • conditionalMultiplication(10) to return 20
  • conditionalMultiplication(3) to return 15
  • conditionalMultiplication(-9) to return -45
00:00 / 00:58

Share the mistake you found and we’ll fix as soon as we can.