Can You Answer This Simple Swift Question Correctly?
Only 44% of people answer it correctly.
Few days ago, while I was scrolling through my Twitter feed, I stumble upon a simple Swift question. Surprisingly, out of 1334 people that responded, only 44% of people able to answer it correctly. The question goes like this.
You can take a moment to think about it. Once you have figured it out, scroll down to checkout the answer.
The answer is “Objc”.
Is that the answer you choose? Great job if you are able to answer it correctly. If you choose the wrong answer, read on to find out why the answer is “Objc”.
Capturing Values in Closures
The core concept that required in order to get the correct answer for the above question is “capturing values in closures”.