Skip to content

Commit 4a85dd1

Browse files
authored
Update canvas.js
naming update for sample expressions
1 parent 07422cd commit 4a85dd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

canvas.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
(function () {
5-
const EXPRESSIONS = [
5+
const SAMPLE_EXPRESSIONS = [
66
'(a + b)*c - (x - y)/z',
77
'(a * b) - c + z / x',
88
'x - y + (c / (a + b))',
@@ -45,7 +45,7 @@
4545
clearCanvas()
4646
})
4747

48-
document.getElementById('expression-input').value = EXPRESSIONS[Math.floor(Math.random() * EXPRESSIONS.length)]
48+
document.getElementById('expression-input').value = SAMPLE_EXPRESSIONS[Math.floor(Math.random() * SAMPLE_EXPRESSIONS.length)]
4949
setTimeout(() => {
5050
document.getElementById('generate-tree').click()
5151
}, 500)
@@ -70,4 +70,4 @@ function displayErrorMessage() {
7070
`,
7171
footer: '<a href="https://github.com/lnogueir/expression-tree-gen">Learn more</a>'
7272
})
73-
}
73+
}

0 commit comments

Comments
 (0)