0

What does const query selector In my code do? And what does do that const calculator = new calculator line 100-156

Javascript pls explain detaly, I try to understand but cant (CODE FROM YOUTUBE TUTORIAL) https://code.sololearn.com/Wm7aQyKvKV1m/?ref=app

5th Apr 2020, 6:39 PM
kaspars kaspars
kaspars kaspars - avatar
3 Answers
+ 1
Your question is a clue that you've not wrote this code yourself: that's a bad practice to not at least quote for the original author ^^ 'const' is the keyword used to declare a 'constant' value (an imutable -- read-only variable) as you use 'var' (or 'let') to declare variable... 'querySelector' is a method for retrieving reference to elements in the document (web page)... 'new Calculator' create an instance of the user defined class/prototype Calculator...
6th Apr 2020, 8:50 AM
visph
visph - avatar
0
Thank you for your answer, I added that this is from YouTube tutorial. I am getting really really hard time understanding why I need these in my code, can you please tell me why I need this stuff in code??
6th Apr 2020, 10:10 AM
kaspars kaspars
kaspars kaspars - avatar