From 142c54d98d1b3b1b07f96d044a1fdc98a6fc6f07 Mon Sep 17 00:00:00 2001 From: Phil <4522927+p2635@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:47:12 +0000 Subject: [PATCH 1/6] Replaced 'such' --- 1-js/01-getting-started/1-intro/article.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 2f4f518f3e..6672bfe3ba 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -61,7 +61,7 @@ For instance, in-browser JavaScript is able to: JavaScript's abilities in the browser are limited to protect the user's safety. The aim is to prevent an evil webpage from accessing private information or harming the user's data. -Examples of such restrictions include: +Examples of restrictions include: - JavaScript on a webpage may not read/write arbitrary files on the hard disk, copy them or execute programs. It has no direct access to OS functions. @@ -77,7 +77,7 @@ Examples of such restrictions include: ![](limitations.svg) -Such limitations do not exist if JavaScript is used outside of the browser, for example on a server. Modern browsers also allow plugins/extensions which may ask for extended permissions. +These limitations do not exist if JavaScript is used outside of the browser, for example on a server. Modern browsers also allow plugins/extensions which may ask for extended permissions. ## What makes JavaScript unique? @@ -104,7 +104,7 @@ So, recently a plethora of new languages appeared, which are *transpiled* (conve Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood". -Examples of such languages: +Examples of these languages: - [CoffeeScript](https://coffeescript.org/) is "syntactic sugar" for JavaScript. It introduces shorter syntax, allowing us to write clearer and more precise code. Usually, Ruby devs like it. - [TypeScript](https://www.typescriptlang.org/) is concentrated on adding "strict data typing" to simplify the development and support of complex systems. It is developed by Microsoft. From 33e477c1cbbcd7e135a0793753f4781762a5c3b5 Mon Sep 17 00:00:00 2001 From: Phil <4522927+p2635@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:48:57 +0000 Subject: [PATCH 2/6] Change 'we' to 'you' to be more direct --- 1-js/01-getting-started/1-intro/article.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 6672bfe3ba..db84b9a834 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -1,6 +1,6 @@ # An Introduction to JavaScript -Let's see what's so special about JavaScript, what we can achieve with it, and what other technologies play well with it. +Let's see what's so special about JavaScript, what you can achieve with it, and what other technologies play well with it. ## What is JavaScript? @@ -70,7 +70,7 @@ Examples of restrictions include: There are ways to interact with the camera/microphone and other devices, but they require a user's explicit permission. So a JavaScript-enabled page may not sneakily enable a web-camera, observe the surroundings and send the information to the [NSA](https://en.wikipedia.org/wiki/National_Security_Agency). - Different tabs/windows generally do not know about each other. Sometimes they do, for example when one window uses JavaScript to open the other one. But even in this case, JavaScript from one page may not access the other page if they come from different sites (from a different domain, protocol or port). - This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and must contain special JavaScript code that handles it. We'll cover that in the tutorial. + This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and must contain special JavaScript code that handles it. You'll learn that in the tutorial. This limitation is, again, for the user's safety. A page from `http://anysite.com` which a user has opened must not be able to access another browser tab with the URL `http://gmail.com`, for example, and steal information from there. - JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's a safety limitation. @@ -113,7 +113,7 @@ Examples of these languages: - [Brython](https://brython.info/) is a Python transpiler to JavaScript that enables the writing of applications in pure Python without JavaScript. - [Kotlin](https://kotlinlang.org/docs/reference/js-overview.html) is a modern, concise and safe programming language that can target the browser or Node. -There are more. Of course, even if we use one of these transpiled languages, we should also know JavaScript to really understand what we're doing. +There are more. Of course, even if you use one of these transpiled languages, you should also know JavaScript to really understand what you're doing. ## Summary From 88e595e125aaf0196dc3909b3cde94a463db9702 Mon Sep 17 00:00:00 2001 From: Phil <4522927+p2635@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:51:17 +0000 Subject: [PATCH 3/6] Simplify 'able to' to 'can' --- 1-js/01-getting-started/1-intro/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index db84b9a834..281813a187 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -49,7 +49,7 @@ JavaScript's capabilities greatly depend on the environment it's running in. For In-browser JavaScript can do everything related to webpage manipulation, interaction with the user, and the webserver. -For instance, in-browser JavaScript is able to: +For instance, in-browser JavaScript can: - Add new HTML to the page, change the existing content, modify styles. - React to user actions, run on mouse clicks, pointer movements, key presses. From e7b1f0c6916091b77246b776b7a4a733d1d24443 Mon Sep 17 00:00:00 2001 From: Phil <4522927+p2635@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:52:33 +0000 Subject: [PATCH 4/6] Change' 'plethora' to 'many' for plain language --- 1-js/01-getting-started/1-intro/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 281813a187..08a9183a24 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -100,7 +100,7 @@ The syntax of JavaScript does not suit everyone's needs. Different people want d That's to be expected, because projects and requirements are different for everyone. -So, recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser. +So, recently many new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser. Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood". From ee3ccab974d095a68fbc5f1e7314fcae728a6989 Mon Sep 17 00:00:00 2001 From: Phil <4522927+p2635@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:59:13 +0000 Subject: [PATCH 5/6] Removed unnecessary extra words --- 1-js/01-getting-started/1-intro/article.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 08a9183a24..003ac75e4b 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -15,10 +15,10 @@ In this aspect, JavaScript is very different from another language called [Java] ```smart header="Why is it called JavaScript?" When JavaScript was created, it initially had another name: "LiveScript". But Java was very popular at that time, so it was decided that positioning a new language as a "younger brother" of Java would help. -But as it evolved, JavaScript became a fully independent language with its own specification called [ECMAScript](http://en.wikipedia.org/wiki/ECMAScript), and now it has no relation to Java at all. +As it evolved, JavaScript became a fully independent language with its own specification called [ECMAScript](http://en.wikipedia.org/wiki/ECMAScript), and now it has no relation to Java at all. ``` -Today, JavaScript can execute not only in the browser, but also on the server, or actually on any device that has a special program called [the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine). +Today, JavaScript can execute not only in the browser, but also on the server, or on any device that has a special program called [the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine). The browser has an embedded engine sometimes called a "JavaScript virtual machine". @@ -35,8 +35,8 @@ The terms above are good to remember because they are used in developer articles Engines are complicated. But the basics are easy. 1. The engine (embedded if it's a browser) reads ("parses") the script. -2. Then it converts ("compiles") the script to machine code. -3. And then the machine code runs, pretty fast. +2. It converts ("compiles") the script to machine code. +3. The machine code runs, pretty fast. The engine applies optimizations at each step of the process. It even watches the compiled script as it runs, analyzes the data that flows through it, and further optimizes the machine code based on that knowledge. ``` @@ -70,7 +70,7 @@ Examples of restrictions include: There are ways to interact with the camera/microphone and other devices, but they require a user's explicit permission. So a JavaScript-enabled page may not sneakily enable a web-camera, observe the surroundings and send the information to the [NSA](https://en.wikipedia.org/wiki/National_Security_Agency). - Different tabs/windows generally do not know about each other. Sometimes they do, for example when one window uses JavaScript to open the other one. But even in this case, JavaScript from one page may not access the other page if they come from different sites (from a different domain, protocol or port). - This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and must contain special JavaScript code that handles it. You'll learn that in the tutorial. + This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and contain special JavaScript code that handles it. You'll learn that in the tutorial. This limitation is, again, for the user's safety. A page from `http://anysite.com` which a user has opened must not be able to access another browser tab with the URL `http://gmail.com`, for example, and steal information from there. - JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's a safety limitation. @@ -96,13 +96,13 @@ That said, JavaScript can be used to create servers, mobile applications, etc. ## Languages "over" JavaScript -The syntax of JavaScript does not suit everyone's needs. Different people want different features. +The JavaScript syntax does not suit everyone's needs. Different people want different features. -That's to be expected, because projects and requirements are different for everyone. +That's expected, because projects and requirements are different for everyone. -So, recently many new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser. +Recently many new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser. -Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood". +Modern tools make the transpilation very fast and transparent, allowing developers to code in another language and auto-converting it "under the hood". Examples of these languages: From a3d7595f4cc4499032245f708dd6b5728fa434a3 Mon Sep 17 00:00:00 2001 From: Phil <4522927+p2635@users.noreply.github.com> Date: Sat, 28 Jan 2023 01:00:27 +0000 Subject: [PATCH 6/6] Restructure flow --- 1-js/01-getting-started/1-intro/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 003ac75e4b..cb94cccb65 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -8,9 +8,9 @@ Let's see what's so special about JavaScript, what you can achieve with it, and The programs in this language are called *scripts*. They can be written right in a web page's HTML and run automatically as the page loads. -Scripts are provided and executed as plain text. They don't need special preparation or compilation to run. +JavaScript is very different from another language called [Java](https://en.wikipedia.org/wiki/Java_(programming_language)). -In this aspect, JavaScript is very different from another language called [Java](https://en.wikipedia.org/wiki/Java_(programming_language)). +Scripts are provided and executed as plain text. They don't need special preparation or compilation to run. ```smart header="Why is it called JavaScript?" When JavaScript was created, it initially had another name: "LiveScript". But Java was very popular at that time, so it was decided that positioning a new language as a "younger brother" of Java would help.