How do you place a canvas element with an ID of canvas1 into a JavaScript variable?
How do you place a canvas element with an ID of canvas1 into a JavaScript variable?
A. var canvas1 = document.getElementById(‘canvas1’);
B. var canvas1 = document.get(‘#canvas1’);
C. var canvas1 = getElementById(‘canvas1’);
D. var canvas1 = document.getElement(‘canvas1’);