0
? to if
How to change these codes to normal if?? left = typeof left != "number" ? 0 : left; right = typeof right != "number" ? items.length - 1 : right;
1 Answer
+ 1
if(typeof left != "number")
left = 0;
else
left = left;
if(typeof right != "number")
right = items.lenght -1;
else
right = right;