997 B
997 B
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
587d7b7e367417b2b2512b24 | Use the Conditional (Ternary) Operator | 1 |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert(/.+?\s*?\?\s*?.+?\s*?:\s*?.+?/gi.test(code), "<code>checkEqual</code> should use the <code>conditional operator</code>");'
- text: ''
testString: 'assert(checkEqual(1, 2) === false, "<code>checkEqual(1, 2)</code> should return false");'
- text: ''
testString: 'assert(checkEqual(1, 1) === true, "<code>checkEqual(1, 1)</code> should return true");'
- text: ''
testString: 'assert(checkEqual(1, -1) === false, "<code>checkEqual(1, -1)</code> should return false");'
Challenge Seed
function checkEqual(a, b) {
}
checkEqual(1, 2);
Solution
// solution required