Swift Error: Variable used within its own initial value
You are declaring a constant named word
, and trying to use the argument with the same name to initialize it. The compiler tries to use the just declared constant to assign its own initial value, instead of using the argument.
I have faced same error when missing out if while unwrapping the text .
By adding if resolved above issue.