here are some of approach based in example:
Method 1: Using Nested Loops

Method 2: Using repeat() Method:

Method 3: Using ES6 Repeat and Template Literals:

Method 4: Using Array and Join Method

here are some of approach based in example:
Method 1: Using Nested Loops

Method 2: Using repeat() Method:

Method 3: Using ES6 Repeat and Template Literals:

Method 4: Using Array and Join Method
