why using only “let” to create objects of class type?
Can we use “var” or just name of object for creating objects like we do for declaring variables ?
Why using "let" only
You can use var there is no obligation but var scope gets little confusing, check this to see where to use which one: https://www.geeksforgeeks.org/difference-between-var-and-let-in-javascript/#:~:text=var%20and%20let%20are%20both,program%20as%20compared%20to%20let.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.