Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

sample typescript code

for (let i: number = 0; i < 5; ++i) {
  let line: string = "";
  for(let j: number = 0; j <= i; ++j) {
    line += "*";
  }
  console.log(line);
}
/*Simple for loop that gives this output:
*
**
***
****
*****
*/
 
PREVIOUS NEXT
Tagged: #sample #typescript #code
ADD COMMENT
Topic
Name
6+8 =