Javascript String palindromo()

Description

Javascript String palindromo()


String.prototype.palindromo = function(){
  var selfUpperCase = this.toUpperCase();
  return selfUpperCase === selfUpperCase.split('').reverse().join('');
};

Javascript String palindromo()

String.prototype.palindromo = function(){
  return this.toString().toUpperCase() === this.split('').reverse().join('').toString().toUpperCase();
};

Javascript String palindromo()

String.prototype.palindromo = function(){
  var text = this.toUpperCase();
  var reverse = text.split('').reverse().join('');

  return text === reverse;
};

Javascript String palindromo()

String.prototype.palindromo=function(){
  return this==this.split('').reverse().join('');
}

Javascript String palindromo()

String.prototype.palindromo = function(){
  return this.split('').join('') === this.split('').reverse().join('');
}

Javascript String palindromo()

String.prototype.palindromo = function(){
  return this.split('').reverse().join('') === this.toString();
}

Javascript String palindromo()

String.prototype.palindromo = function(){
  var reverso = this.split('').reverse().join('');
  return this.toString() === reverso;
}

Date.prototype.bissexto = function(){
  return ((this.getFullYear() % 100 !== 0 && this.getFullYear() % 4 === 0) || (this.getFullYear() % 400 === 0));

}



PreviousNext

Related