/* * triangle-star.js * */ import {terminal} from "./dfhi.js"; window.main = function(...argv) { let n = Number.parseInt(argv[0], 10); const character = "*", separator = " "; let html = "
"); html += " | "; } for (let star = 1; star <= line; ++star) { //terminal.printh(` | ${character} | `); html += `${character} | `; if (star < line) { //terminal.printh(""); html += " | "; } } for (let space = n-line; space > 0; --space) { //terminal.printh(" | "); html += " | " } //terminal.printh(" |