Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 311 Bytes

01-looping-a-triangle.md

File metadata and controls

21 lines (17 loc) · 311 Bytes

Looping a triangle

Write a loop that makes seven calls to console.log to output the following triangle:

#
##
###
####
#####
######
#######

It may be useful to know that you can find the length of a string by writing .length after it.

let abc = "abc";
console.log(abc.length);
// → 3