Em Har9,775 Points
Variable named language
im putting var str = "swift" but my error says make sure your variable is a named language. What do I do?
// Enter your code below var str = "swift"
Caleb KleveterTreehouse Moderator 37,861 Points
Your variable looks like this:
var str = "swift"
A variable has 4 components:
- The variable keyword (
- The name of the variable (in your case
- The assignment operator (
- The variable's value (in your case
The error you are getting says you need to make sure you have a variable named
language, so you should change the second component I listed to fix that. Though your code technically works, the challenge expects a specific name for the variable.
As a side note, make sure the casing of the string you assign the variable to is correct.
Swift might be correct while
swift could cause the challenge to fail.