-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreatePattern.js
More file actions
25 lines (19 loc) · 789 Bytes
/
createPattern.js
File metadata and controls
25 lines (19 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const extractInputs = require('./src/patternsUtil.js').extractInputs;
const createDiamond = require('./src/patternsLib.js').createDiamond;
const createTriangle = require('./src/patternsLib.js').createTriangle;
const createRectangle = require('./src/patternsLib.js').createRectangle;
const main = function(type,height){
console.log(createDiamond(type,height));
}
let inputs = extractInputs(process.argv);
main(inputs.type,inputs.height)
const main = function(type,height,breadth){
console.log(createRectangle(type,height,breadth));
}
let inputs = extractInputs(process.argv);
main(inputs.type,inputs.height,inputs.breadth)
const main = function(type,height){
console.log(createTriangle(type,height));
}
let inputs = extractInputs(process.argv);
main(inputs.type,inputs.height);