Question: Write a javascript function called isWeekday that takes a string parameter - to find out if the parameter passed in is a day of the

Write a javascript function called isWeekday that takes a string parameter - to find out if the parameter passed in is a day of the week (ie. Not a weekend day).

Here is the function in action: assert.equal(isWeekday('Saturday'), false); assert.equal(isWeekday('Monday'), true);

These asserts will test your function:

assert.equal(isWeekday('Saturday'), false); assert.equal(isWeekday('Sunday'), false); assert.equal(isWeekday('Monday'), true); assert.equal(isWeekday('Tuesday'), true); assert.equal(isWeekday('Wednesday'), true); assert.equal(isWeekday('Thursday'), true); assert.equal(isWeekday('Friday'), true);

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!