diff --git a/doc/docs.md b/doc/docs.md index 6bac0e789f..e84c3123b6 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -24,9 +24,9 @@ It is easy, and it takes only a few seconds: [https://github.com/vlang/v#installing-v](https://github.com/vlang/v#installing-v---from-source-preferred-method) ## Upgrading V to latest version -If V is already installed on a machine, it can be upgrade to latest version +If V is already installed on a machine, it can be upgraded to its latest version by using the V's built-in self-updater. -To upgrade the version run the command ` v up` +To do so, run the command `v up`. ## Table of Contents @@ -1278,6 +1278,19 @@ val2 := arr[333]? println(val2) ``` +V also supports nested maps: +```v +mut m := map[string]map[string]int{} +m['greet'] = { + 'Hello': 1 +} +m['place'] = { + 'world': 2 +} +m['code']['orange'] = 123 +print(m) +``` + Maps are ordered by insertion, like dictionaries in Python. The order is a guaranteed language feature. This may change in the future.