Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What type of variables are in Javascript?
Answer: Must declare variables before they’re used in the program
Declare 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:

©2025 WithoutBook