const x = 10;
const y = 4;
var GraphData = {
Xinc: 1, Yinc: 1, Zinc: undefined, Quadrant: undefined
}
var graph2 = "----------+----------"
if (x > (10 * GraphData.Xinc)) {
console.log("X value to high");
process.exit();
}
solveX(x, GraphData);
// function
function solveX(xPoint, Line) {
for (var i = 0; i < graph2.length; i++) {
if (i == xPoint) {
var updatedGraph = graph2.substring(0, i+10) + "●" + graph2.substring(i+10 + 1);
}
}
formGraph(undefined, undefined, updatedGraph);
}
function formGraph(xPoint, Ypoint, Line) {
var Finalgraph = (` |
|
|` + "\n" + Line + "\n" + ` |
|
|`);
console.log(Finalgraph);
}
/* symbols
|
-
╱
○
●
var EmptyGraph = (` |
|
|
----------+----------
|
|
|
`); */
To embed this project on your website, copy the following code and paste it into your website's HTML: