Question: use proper ES6 syntax including using let/const properly. do not use Regular Expressions (Regex) HINT: Refer to Mozilla Developer Docs as needed Problem 2 -

use proper ES6 syntax including using let/const properly.

do not use Regular Expressions (Regex)

HINT: Refer to Mozilla Developer Docs as needed

Problem 2 -

  • Write a function called sumEvenOdd
  • This function takes one argument which is a number
  • This function sums all the digits of a given number and determines if it is even or add
  • This function returns the string:
    • The sum of the digits for is

OUTPUT Example:

sumEvenOdd(11)

output: The sum of the digits for 11 is even

sumEvenOdd(12345)

output: The sum of the digits for 12345 is odd

THIS IS IN JAVASCRIPT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!