Javascript String dashalize()

Description

Javascript String dashalize()



//returns a new string, where every `"_"` is replaced by a dash - `"-"`
String.prototype.dashalize = function () {
    return this.replace(/_/g, "-");
};



PreviousNext

Related