Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 401 Bytes

catchup-print-pattern-2.md

File metadata and controls

17 lines (16 loc) · 401 Bytes

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

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

should print

0000
1000
1100
1110
1111

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