Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 420 Bytes

catchup-print-pattern-1.md

File metadata and controls

17 lines (16 loc) · 420 Bytes

Create a function that prints the following pattern to the console.

function printPattern(rows){
// write your code here
}
printPattern(5);

should print 5 rows like this :

1111
1110
1100
1000
0000

HINT: You can use the repeat function to create a string with the same character repeated multiple times.