Skip to content

Instantly share code, notes, and snippets.

@ImadBoumzaoued
Last active March 16, 2017 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ImadBoumzaoued/a99cd36ce2014b1f1b07573bd9b65a4b to your computer and use it in GitHub Desktop.
Save ImadBoumzaoued/a99cd36ce2014b1f1b07573bd9b65a4b to your computer and use it in GitHub Desktop.
esnextbin sketch
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ESNextbin Sketch</title>
<!-- put additional styles and scripts here -->
</head>
<body>
<!-- put markup and other contents here -->
</body>
</html>
const num = 6;
let str = '';
for(let i = 0; i < num; i++) {
for(let j = 0; j < num; j++) {
if(j + i >= num - 1) str += '*';
else str += ' ';
}
str += '\n';
}
console.log(str);
{
"name": "esnextbin-sketch",
"version": "0.0.0"
}
'use strict';
var num = 6;
var str = '';
for (var i = 0; i < num; i++) {
for (var j = 0; j < num; j++) {
if (j + i >= num - 1) str += '*';else str += ' ';
}
str += '\n';
}
console.log(str);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment