String replacing in JavaScript

replace
Задание 1

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