--- id: 5d7925334c5e22586dd72962 title: Part 22 challengeType: 0 dashedName: part-22 --- # --description-- The ternary operator has the following syntax: ```js const result = condition ? valueIfTrue : valueIfFalse; const result = 1 === 1 ? 1 : 0; // 1 const result = 9 > 10 ? "Yes" : "No"; // "No" ``` Use this operator to return `str` if `str === str2`, and an empty string (`""`) otherwise. # --hints-- See description above for instructions. ```js assert( highPrecedence('2*2') === '' && highPrecedence('2+2') === '2+2' && code.includes('?') ); ``` # --seed-- ## --before-user-code-- ```html Spreadsheet
``` ## --after-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```