Saturday, November 23, 2013

Ternary Operator in javascript


var eVal = (isNaN(eThis.val())) ? 0 : eThis.val();
var eVal = parseFloat($(eThis).val()) || 0;

No comments: