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
Get step-by-step solutions from verified subject matter experts
