ES6 – Creating copies of a specific string

Hi, ES6 have this amazing method called repeat() of the string object, that can help us to construct and returns a new string which contains the specified number of copies on which it was called, joining both.

console.log("Cristina ".repeat(6)); // will create 6 'Cristina' string 

Result:

By Cristina Rojas.