You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a function strCount (takes an object as argument) that will count all string values inside an object. For example:
strCount({
first: "1",
second: "2",
third: false,
fourth: ["anytime",2,3,4],
fifth: null
})
//returns 3
Your Test Cases:
Test.assertEquals(strCount({
first: "1",
second: "2",
third: false,
fourth: ["anytime",2,3,4],
fifth: null,
sixth: undefined,
seventh:{}
}),3,"Did not count the correct number of strings. Check counting inside nested objects.");
Create a function strCount (takes an object as argument) that will count all string values inside an object. For example:
strCount({
first: "1",
second: "2",
third: false,
fourth: ["anytime",2,3,4],
fifth: null
})
//returns 3
Your Test Cases:
Test.assertEquals(strCount({
first: "1",
second: "2",
third: false,
fourth: ["anytime",2,3,4],
fifth: null,
sixth: undefined,
seventh:{}
}),3,"Did not count the correct number of strings. Check counting inside nested objects.");
where By
http://www.codewars.com/kata/565b3542af398bfb50000003/train/javascript
The text was updated successfully, but these errors were encountered: