function numberToDashes(num) {
let array = [];
for (let i = 0; i < num; i++) {
const element = array.push("-");
}
return array.join('')
}
function numToDashes(num) {
return "-".repeat(num);
}
console.log('Expect "---" === '+ numToDashes(3)) //Expect "---"
console.log('Expect "-----" === '+numberToDashes(5)) // Expect "-----"