Question: I have a list with integers that is coming from flask-sqlalchemy database. Im displaying these integers in a list with (li) tags. I wondering how I could take these integers and multiply them by "I". So the result would for example be: 5\*"I", 6\*"I" and that would display: 

IIIII

IIIIII 

in the list, instead of the showing as integers.

Thanks!

Answer: 
I think you may be looking for this built-in String method:

```
"I".repeat(5) // IIIII
"I".repeat(6) // IIIIII

```
You can use JavaScript's built in `String.repeat` function along with `Array.map`.

```
var numList = [3,5,2,6,7,4,1,2]; // <-- what you get from database

var strList = list.map((e) => "I".repeat(e)); // <-- this is what you need 

console.log(is.join(",")); // prints "III,IIIII,II,IIIIII,IIIIIII,IIII,I,II"

```

**String.repeat**

> 
> 
> > 
> > The repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
> >    
> > 
> > <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat>
> > 
> > 
> > 
> 
> 
>