Javascript Array first(defaultValue)

Description

Javascript Array first(defaultValue)

Array.prototype.first = function(defaultValue)
{
  var val = this[0];
  return (PhuelFramework.Util.isSet(val))
    ? val// w ww.  j a va 2s . c  o  m
    : defaultValue;
};



PreviousNext

Related