"{}"
)["ABC"]
, produces the output string of the word inside the two braces, e.g. "{ABC}"
["ABC", "DEF"]
, produces the output string of the two words inside the two braces with the words separated by the string " and "
, e.g. "{ABC and DEF}"
["ABC", "DEF", "G", "H"]
, produces the output string of all but the last word separated by ", "
with the last word separated by " and "
and all within braces; e.g. "{ABC, DEF, G and H}"
quibble
should be a function.
testString: assert(typeof quibble === 'function');
- text: quibble(["ABC"])
should return a string.
testString: assert(typeof quibble(["ABC"]) === 'string');
- text: quibble([])
should return "{}".
testString: assert.equal(quibble(testCases[0]), results[0]);
- text: quibble(["ABC"])
should return "{ABC}".
testString: assert.equal(quibble(testCases[1]), results[1]);
- text: quibble(["ABC", "DEF"])
should return "{ABC and DEF}".
testString: assert.equal(quibble(testCases[2]), results[2]);
- text: quibble(["ABC", "DEF", "G", "H"])
should return "{ABC,DEF,G and H}".
testString: assert.equal(quibble(testCases[3]), results[3]);
```