Retired
Talking about types and args (retired)
Description:
Write a function that should receive a dynamic number of arguments of type number, string, or boolean. and then return all parameters concatenated by hyphen "-".
If any other type is passed, then return undefined
Example:
{
const result = magicFunction(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
console.log(result) // must be "1-2-3-4-5-6-7-8-9-10"
}
{
const result = magicFunction("a", 2, "b", 4, "c", false);
console.log(result) // must be "a-2-b-4-c-false"
}
{
const result = magicFunction("a", 2, "b", 4, "c", null);
console.log(result) // must be undefined
}
Fundamentals
Similar Kata:
Stats:
Created | Jun 16, 2022 |
Warriors Trained | 17 |
Total Skips | 0 |
Total Code Submissions | 32 |
Total Times Completed | 13 |
JavaScript Completions | 13 |
Total Stars | 0 |
% of votes with a positive feedback rating | 38% of 12 |
Total "Very Satisfied" Votes | 3 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 6 |
Total Rank Assessments | 12 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |