iOS Swift Basics An Introduction to Swift Programming Working With Variables

I'm trying to complete the challenge Task question by the declaring the variable name language.

Plus creating a string? My answer was var str = "language" and it said my answer was incorrect? What did I do wrong?

 var str = "language"

1 Answer

Matthew Long
Matthew Long
28,372 Points

You successfully created a variable of type String named str with the value "language". The challenge asked you to create a variable of type String named language with the value "Swift":

var language = "Swift"

For the second part of this challenge it is asking you to reassign the variable language with the string value of "Objective-C". To reassign the variable you don't need to include the var keyword again.

Hopefully that clears things up a bit?

Thank You!