From 51410b0922c948f64d312530daf1c4a3b4cabf07 Mon Sep 17 00:00:00 2001 From: zakuro Date: Mon, 6 Sep 2021 00:23:04 +0900 Subject: [PATCH] docs: add example for map's `.keys()` method (#11397) --- doc/docs.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/docs.md b/doc/docs.md index 77b5544654..f4de4958dc 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -1043,6 +1043,7 @@ m['two'] = 2 println(m['one']) // "1" println(m['bad_key']) // "0" println('bad_key' in m) // Use `in` to detect whether such key exists +println(m.keys()) // ['one', 'two'] m.delete('two') ``` Maps can have keys of type string, rune, integer, float or voidptr.