How do you place a canvas element with an ID of canvas1 into a JavaScript variable?

QuestionsCategory: QuestionsHow do you place a canvas element with an ID of canvas1 into a JavaScript variable?
admin Staff asked 4 years ago

Answer: var canvas1 = document.getElementById(‘canvas1’);