Nodejs String Length Check isLengthGreatherThan(limit)

Here you can find the source of isLengthGreatherThan(limit)

Method Source Code

'use strict';//w w  w  .j a v  a2 s.  c  om

String.prototype.isLengthGreatherThan = function(limit) {
  return this.length > limit;
};

console.log('John'.isLengthGreatherThan(3));

Number.prototype.isPositive = function() {
    return this > 0;
};

var a = -3;

console.log(a.isPositive());

Related

  1. isLengthGreaterThan(limit)
    String.prototype.isLengthGreaterThan = function(limit) {
      return this.length > limit; 
    console.log("Ringo".isLengthGreaterThan(3));
    Number.prototype.isPositive = function() {
      return this > 0;
    var n = new Number(3);
    console.log(n.isPositive());
    ...
    
  2. isLengthGreaterThan(limit)
    String.prototype.isLengthGreaterThan = function(limit) {
        return this.length > limit;
    console.log('John'.isLengthGreaterThan(3));
    Number.prototype.isPositive = function() {
        return this > 0;
    var a = new Number(3);
    console.log(a.isPositive());
    ...
    
  3. isLengthGreaterThan(limit)
    String.prototype.isLengthGreaterThan = function(limit) {
        return this.length > limit;
    console.log("John".isLengthGreaterThan(3));
    Number.prototype.isPositive = function() {
        return this > 0;
    
  4. isLengthGreaterThan(limit)
    String.prototype.isLengthGreaterThan = function(limit) {
        return this.length > limit;  
    console.log("John".isLengthGreaterThan(3));
    Number.prototype.isPositive = function() {
        return this > 0;   
    3.isPostive(3); 
    a.isPositive() 
    ...
    
  5. isLengthGreaterThan(limit)
    String.prototype.isLengthGreaterThan = function(limit) {
      return this.length > limit;
    console.log("John".isLengthGreaterThan(3));
    Number.prototype.isPositive = function() {
      return this > 0;
    var a = new Number(3);
    console.log(a.isPositive());
    ...