Javascript String removeComments()
removeComments()
'use strict';//from w w w . java 2 s. com String.prototype.removeComments = function() { return this.replace(/(\s+\/\/.*)/g, ""); };