From 7035d14f17271f105523ba51a16c535ae1b1c737 Mon Sep 17 00:00:00 2001 From: Rose W Date: Tue, 9 Oct 2018 23:42:37 -0400 Subject: [PATCH] To make the "you" and "we" more consistent. I found that both were used to signify the reader. To keep it consistent, only "we" or "you" might make more sense. https://ux.stackexchange.com/questions/57305/we-vs-you-in-documentation --- resources/1-Javascript-General-Topics/functions.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/1-Javascript-General-Topics/functions.md b/resources/1-Javascript-General-Topics/functions.md index eae1fa0..cae4e6f 100644 --- a/resources/1-Javascript-General-Topics/functions.md +++ b/resources/1-Javascript-General-Topics/functions.md @@ -2,11 +2,11 @@ ### Scope and Closure -* When you first start writing a program in JS, you are in the `Global Scope`. If we define a variable, it will be defined globally. +* When we first start writing a program in JS, we are in the `Global Scope`. If we define a variable, it will be defined globally. ```javascript const number = 1; ``` -We generally want to avoid globally scoped variables as you can very quickly run into namespacing issues. +We generally want to avoid globally scoped variables as we can very quickly run into namespacing issues. * A local scope refers to any scope defined inside the global scope. Each function defined has its own local scope. ```js @@ -32,7 +32,7 @@ Locally scoped items are not available to the global scope. ### Anatomy of a function When we approach a function, one of the most valuable abilities is to comfortably understand what the goals -and the use cases of a function are. This can be difficult when a function is not named well, however eventually +and the use cases of a function are. This can be difficult when a function is not named well. However, eventually, even a poorly named function can be parsed by someone with enough experience and knowledge - for example: ```js @@ -86,7 +86,7 @@ function multiplyNumberByTen(aNumber){ } ``` -Now this might start to look a bit intimidating, but let's break it down and demystify. We have an expression being passed into +Now, this might start to look a bit intimidating, but let's break it down and demystify. We have an expression being passed into a function call it looks like! Not only that, part of the expression is a function itself - how does this all work, what is the order? Well, one thing to remember, is that before any variables or expressions are passed into a function as an argument, they need to be resolved