We can repeat a string using the repeat method.

1
2
3
4
const symbol = '*'

console.log(symbol.repeat(10));
// **********

This comes handy in case we want to put some symbols around the page.^_^

Tip: .repeat(0) will return an empty string. So, by controlling the numbers we can decide whether to show those symbols or not.