|
Hello I see the clue, but I am still stuck. I get an Xcode error: No exact matches in call to subscript
Does Anyone have the solution? Many thanks! |
|
Kitty posts a code snip and would like a solution, but perhaps would settle for some clues?
The compiler gives you a great clue! == subscript == But this clue leads to a discussion about variable names. Take a breath, and buckle up! You're trying to make an assignment here...
The compiler complains about the subscript, which you've named Basic LanguageLast century, a beginner's language called
Anyone who saw the letter How can you check? Of course you probably should use a simple print() statement to reveal the contents of Indeed this is a perfect case study showing why Swift developers should go out of their way to use descriptive variable names in code. I think you tricked yourself into believing that Your code:
When you press command and hover your mouse over the var, it changes to a question mark --> ?
Click to reveal details. You'll see that the compiler infers that i is a Instead, consider the following:
Keep coding!Please return and let us know what you learned. |
|
hello evry one this is my solution it work just fine do you have any remarques for me
|
SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.