From 46c2c12a858339e2579b6a31dfa4a14649f114f3 Mon Sep 17 00:00:00 2001 From: Kevan Stannard Date: Sun, 7 Mar 2021 21:15:01 +1100 Subject: [PATCH 1/2] Syntax lookup: let binding --- misc_docs/syntax/language_let.mdx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 misc_docs/syntax/language_let.mdx diff --git a/misc_docs/syntax/language_let.mdx b/misc_docs/syntax/language_let.mdx new file mode 100644 index 000000000..72f5a7326 --- /dev/null +++ b/misc_docs/syntax/language_let.mdx @@ -0,0 +1,31 @@ +--- +id: "let-binding" +keywords: ["let", "variable"] +name: "let" +summary: "This is the `let binding` keyword." +category: "languageconstructs" +--- + +`let` is used to _bind_ values to names, which is simiar to assigning values to variables in other languages. + +### Example + + + +```res +let greeting = "hello!" +let score = 10 +let newScore = 10 + score +``` + +```js +var newScore = 20; +var greeting = "hello!"; +var score = 10; +``` + + + +### References + +* [Let Binding](/docs/manual/latest/let-binding) From 1934ad82c4ac368c43bdad6aceb9e4eb2c64a117 Mon Sep 17 00:00:00 2001 From: Kevan Stannard Date: Sun, 7 Mar 2021 21:16:33 +1100 Subject: [PATCH 2/2] Fix typo --- misc_docs/syntax/language_let.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc_docs/syntax/language_let.mdx b/misc_docs/syntax/language_let.mdx index 72f5a7326..56f06e78e 100644 --- a/misc_docs/syntax/language_let.mdx +++ b/misc_docs/syntax/language_let.mdx @@ -6,7 +6,7 @@ summary: "This is the `let binding` keyword." category: "languageconstructs" --- -`let` is used to _bind_ values to names, which is simiar to assigning values to variables in other languages. +`let` is used to _bind_ values to names, which is similar to assigning values to variables in other languages. ### Example