
Em Har
9,775 PointsVariable 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"
2 Answers

KRIS NIKOLAISEN
54,524 Pointsmake sure your variable is named language
var language = "Swift"

Caleb Kleveter
Treehouse Moderator 37,862 PointsYour variable looks like this:
var str = "swift"
A variable has 4 components:
- The variable keyword (
var
) - The name of the variable (in your case
str
) - The assignment operator (
=
) - The variable's value (in your case
"swift"
)
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.

Em Har
9,775 PointsI appreciate it!