Javascript String log()

Description

Javascript String log()

String.prototype.log = function() {
        console.log(this.toString())
        return this
}

Javascript String log()

String.prototype.log = function() {
    var args = arguments;
    WScript.StdOut.WriteLine( this.replace(/{(\d+)}/g, function(match, number) {
        return typeof args[number] != 'undefined' ? args[number] : match;
        }) );//from   ww  w .  ja  va2 s .  co m
}



PreviousNext

Related