From 4f981a6e0fff45c838c515730326b3671dcc1499 Mon Sep 17 00:00:00 2001 From: "grejo.j" Date: Wed, 14 Dec 2022 16:11:39 +0530 Subject: [PATCH] docs: addition to variables page --- examples/variables/variables.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/variables/variables.sh b/examples/variables/variables.sh index 6513b1d..eb3b20d 100644 --- a/examples/variables/variables.sh +++ b/examples/variables/variables.sh @@ -4,3 +4,9 @@ initial true 0 apple + +# The shorthand `:=` initialization of variable can +# only be used inside any function. +# If used outside any function, it would generate +# `syntax error: non-declaration statement outside +# function body`.