Skip to content

Commit

Permalink
chore(docs): update language ref with if let var (#3896)
Browse files Browse the repository at this point in the history
Following #3840 - updated the language reference with `if let var`.

## Checklist

- [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [ ] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
staycoolcall911 authored Aug 20, 2023
1 parent 977fa9e commit 19ef86c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/docs/03-language-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,8 @@ if myPerson.address == nil {
#### 1.6.3 Unwrapping using `if let`
The `if let` statement can be used to test if an optional is defined and *unwrap* it into a
non-optional variable defined inside the block:
The `if let` statement (or `if let var` for a reassignable variable) can be used to test if an
optional is defined and *unwrap* it into a non-optional variable defined inside the block:
```TS
if let address = myPerson.address {
Expand Down

0 comments on commit 19ef86c

Please sign in to comment.