Question:
What is the difference between method and property?
Answer:
Properties are basically information that an object has. Methods are what an object can do. Example: You have an instance (object) from a class named Vehicle, which can represent a car, a truck or a motorbike.
Question:
What is a variable?
Answer:
Variable means anything that can vary. JavaScript includes variables which hold the data value and it can be changed anytime. JavaScript uses reserved keyword var to declare a variable. A variable must have a unique name.
Question:
What should you keep in mind when naming your variables?
Answer:
A variable name should have a clean, obvious meaning, describing the data that it stores. The name must contain only letters, digits, or the symbols “$” and underscore “_”. And the first character must not be a digit.
Some names cannot be used as variables because they are used by the language itself.