webmanz Posted March 27, 2018 Report Posted March 27, 2018 (edited) Chapter 4 part 3 Question 2: Using only one statement, create a variable with the name of 'age' and give it a value of: 18 I answered var age="18" but the correct answer was var age= 18 Why my answer was incorrect as it did have the quotes in the right spot. Edited March 27, 2018 by webmanz Quote
administrator Posted March 27, 2018 Report Posted March 27, 2018 Hi, "18" is a string variable and so it is not the same as 18 ... which without quotes, is an int. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.