why is LET an optional statement
Answers
Answered by
1
Answer:
LET is an assignment statement. It is used to assign the value to a variable. LET is an optional statement i.e. without using LET statement one can assign the value to a variable. The data type must match with the variable type otherwise type mismatch error will occur.
Answered by
0
Answer:
Using if-let ( or guard which are two different types of optional binding) will give you more control, it won't crash if the value isn't set. If the value is set, then you can do something. If it's not set then you can add an else statement.
Explanation:
please follow m
Similar questions