Javascript String removeComments()

Description

Javascript String removeComments()


'use strict';//from   w  w w  . java 2  s. com

String.prototype.removeComments = function() {
    return this.replace(/(\s+\/\/.*)/g, "");
};



PreviousNext

Related