Recent | Popular
#function #ternary
function validateString(str) { return str && str.trim().length > 5 ? str : null; }
#ternary #nested #function
function direction(item) { const increment = item.classList[1] === "decrease" ? counter-- : item.classList[1] === "increase" ? counter++ : item.classList[1] === "reset" ? (counter = 0) : counter; return increment; }
#condtional #ternary
const calcTip = (bill) => { return bill >= 50 && bill <= 300 ? bill * 0.15 : bill * 0.20; }
#javascript #ternary
// if something is true then execute the code on the left, otherwise return null e.propertyName === 'transform' ? key.classList.remove('playing') : null;
Sun Jul 28 2024 23:43:44 GMT+0000 (Coordinated Universal Time)
Sat Jul 13 2024 22:19:01 GMT+0000 (Coordinated Universal Time)
Wed Jun 12 2024 06:23:57 GMT+0000 (Coordinated Universal Time)
Wed Apr 03 2024 23:46:07 GMT+0000 (Coordinated Universal Time)