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
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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now