What is the difference between objects and variables in javascript?
-
I'm trying to learn Javascript in w3schools.com and I'm wondering what's the difference between objects and variables?
-
Answer:
Difference between object and variables in Javascript: Variables in Javascript- are "containers" for storing information. JavaScript Variables *As with algebra, JavaScript variables are used to hold values or expressions. *A variable can have a short name, like x, or a more descriptive name, like carname. Rules for JavaScript variable names: •Variable names are case sensitive (y and Y are two different variables) •Variable names must begin with a letter or the underscore character Note: Because JavaScript is case-sensitive, variable names are case-sensitive. Objects in Javascript- is an explanation of the most commonly used JavaScript objects, with all of their properties, methods, and event handlers. *Objects may be created using the following syntax. name = new Object()
2S7BRVBDG6KFCFJJG4GHXLOCOM at Yahoo! Answers Visit the source
Other answers
object is the thing that you made from a class and the class is known as bunch of codes which got instructions to the program and variable is called the space which made on the memory example consider there is a large room and you can keep in there a small box and also you put a sticker on it now the room is considered as the system memory and the box is known as the variable the sticker that on the box is known as the variable name and the type is what kind of things that you can put in to the box I suggest you to don't try firstly on w3schools cause they even don't mention of some concept which comes in object oriented programming languages so most of people some times get confused in first time.
Den Zuk
a variable holds a single type of literal. A object is a instance of a class created by the a programmer with a set of methods which preforms certain task depending what methods have been defined. int a = 4; // a would be the variable Car b = new Car();// b is an object enjoy!
goom
an object is basically a special type of variable. objects can have functions (aka methods) that can be used to manipulate it.
_anonymous_
Object hold the information about the class properties, varible can be type of primary data type but object is always class type variable that hold multiple information. But primary data type variable contain only basic data type of value Suppose int a is a variable it contain only interger value or class ABC { int age; string s; } ABC info is a object that hold both information AGE and Name
Related Q & A:
- What Is The Difference Between Magicjack And Magicjack Plus?Best solution by Yahoo! Answers
- what is the difference between sum of first n primes and prime(prime(n?Best solution by Mathematics
- What's the difference between Fullmetal Alchemist and Fullmetal Alchemist: Brotherhood?Best solution by Yahoo! Answers
- What's the difference between Current (I) and Potential Difference (V?Best solution by diffen.com
- What does it mean to be unresponsive? What's the difference between unresponsive and unconscious?Best solution by answers.yahoo.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.