1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

doc: improve in documentation for maps (#17918)

This commit is contained in:
Artem Yurchenko 2023-04-09 13:43:13 +02:00 committed by GitHub
parent 6acf01a4a0
commit 88f89bde4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1762,10 +1762,17 @@ To do the opposite, use `!in`.
nums := [1, 2, 3]
println(1 in nums) // true
println(4 !in nums) // true
```
> **Note**
> `in` checks if map contains a key, not a value.
```v
m := {
'one': 1
'two': 2
}
println('one' in m) // true
println('three' !in m) // true
```