Write a function normalize, that replaces '-' with '/' in a date string.
Example: normalize('20-05-2017')
should return '20/05/2017'.
This is what I wrote:
function normalize(str) {
let replaced = str.replace('-', '/')
return replaced
}
I can't replace the other - with / can someone explain how to do this?