Question: What type of variables are in Javascript?Answer: Must declare variables before they’re used in the programDeclare at the top of the program & terminate each statement with ‘;’ Intialize variables when appropriate Local variables (declared within a function) destroyed after function exit. Can only be accessed within the function Example – Note Assignments var candyBarPrice = 2.50; var taxRate = .075; var candyBarsPurchased; |
Is it helpful?
Yes
No
Most helpful rated by users:
- What are JavaScript data types?
- What\'s relationship between JavaScript and ECMAScript?
- What does isNaN function do?
- How do you convert numbers between different bases in JavaScript?
- What is negative infinity?