String replacing in JavaScript

Given the string '1-2-3-4-5'. Replace all hyphens to dots.

enru