diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 2f4f518f3e..c48e308d4f 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -1,122 +1,32 @@ -# 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. -## What is JavaScript? +# An Introduction to JavaScript *JavaScript* was initially created to "make web pages alive". 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. - -In this aspect, JavaScript is very different from another language called [Java](https://en.wikipedia.org/wiki/Java_(programming_language)). - ```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. -``` - -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). - -The browser has an embedded engine sometimes called a "JavaScript virtual machine". - -Different engines have different "codenames". For example: - -- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge. -- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox. -- ...There are other codenames like "Chakra" for IE, "JavaScriptCore", "Nitro" and "SquirrelFish" for Safari, etc. - -The terms above are good to remember because they are used in developer articles on the internet. We'll use them too. For instance, if "a feature X is supported by V8", then it probably works in Chrome, Opera and Edge. - -```smart header="How do engines work?" - -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. - -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. -``` - -## What can in-browser JavaScript do? - -Modern JavaScript is a "safe" programming language. It does not provide low-level access to memory or the CPU, because it was initially created for browsers which do not require it. +When JavaScript was created, it initially had another name: "LiveScript". But another language named Java was very popular at that time, so it was decided that positioning a new language as a "younger brother" of Java would help. -JavaScript's capabilities greatly depend on the environment it's running in. For instance, [Node.js](https://wikipedia.org/wiki/Node.js) supports functions that allow JavaScript to read/write arbitrary files, perform network requests, etc. - -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: - -- Add new HTML to the page, change the existing content, modify styles. -- React to user actions, run on mouse clicks, pointer movements, key presses. -- Send requests over the network to remote servers, download and upload files (so-called [AJAX](https://en.wikipedia.org/wiki/Ajax_(programming)) and [COMET](https://en.wikipedia.org/wiki/Comet_(programming)) technologies). -- Get and set cookies, ask questions to the visitor, show messages. -- Remember the data on the client-side ("local storage"). - -## What CAN'T in-browser JavaScript do? - -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: - -- 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. - - Modern browsers allow it to work with files, but the access is limited and only provided if the user does certain actions, like "dropping" a file into a browser window or selecting it via an `` tag. - - 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 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. - -![](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. - -## What makes JavaScript unique? - -There are at least *three* great things about JavaScript: - -```compare -+ Full integration with HTML/CSS. -+ Simple things are done simply. -+ Supported by all major browsers and enabled by default. +...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. ``` -JavaScript is the only browser technology that combines these three things. - -That's what makes JavaScript unique. That's why it's the most widespread tool for creating browser interfaces. -That said, JavaScript can be used to create servers, mobile applications, etc. +## JavaScript engine -## Languages "over" JavaScript +A "JavaScript engine", sometimes also called a "JavaScript virtual machine" – is a piece of software which can be embedded in a browser or another bigger program and can execute JavaScript. -The syntax of JavaScript does not suit everyone's needs. Different people want different features. +Historically, web development is the main field of application for JavaScript. -That's to be expected, because projects and requirements are different for everyone. +This is because of its wide adoption and uniquely tight integration with HTML/CSS. -So, recently a plethora of new languages appeared, which are *transpiled* (converted) to JavaScript before they run in the browser. +**Nowadays though, JavaScript can execute not only in the browser, but also on the server, or on any device which supports a JavaScript engine.** -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: - -- [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. -- [Flow](https://flow.org/) also adds data typing, but in a different way. Developed by Facebook. -- [Dart](https://www.dartlang.org/) is a standalone language that has its own engine that runs in non-browser environments (like mobile apps), but also can be transpiled to JavaScript. Developed by Google. -- [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. +Different engines have different "codenames". For example: -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. +- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome, Opera and Edge. +- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox. +- ...There are other codenames like "JavaScriptCore", "Nitro" and "SquirrelFish" for Safari, etc. -## Summary +The terms above are good to remember because they are often mentioned. For instance, if your hear that "a feature X is supported by V8", then it probably works in Chrome, Opera and Edge browsers. -- JavaScript was initially created as a browser-only language, but it is now used in many other environments as well. -- Today, JavaScript has a unique position as the most widely-adopted browser language, fully integrated with HTML/CSS. -- There are many languages that get "transpiled" to JavaScript and provide certain features. It is recommended to take a look at them, at least briefly, after mastering JavaScript. +As mentioned, engines can execute not only in the browser. For instance, [Node.js](https://nodejs.org/) allows to execute JavaScript code without any browser at all. It's based on V8 engine. One can install it locally on your computer and write JavaScript code for to assist in daily tasks or make a web server using it. diff --git a/1-js/01-getting-started/1-intro/limitations.svg b/1-js/01-getting-started/1-intro/limitations.svg deleted file mode 100644 index 76ea43fd7a..0000000000 --- a/1-js/01-getting-started/1-intro/limitations.svg +++ /dev/null @@ -1 +0,0 @@ -https://javascript.info<script> ... </script>https://gmail.comhttps://javascript.info \ No newline at end of file diff --git a/1-js/01-getting-started/2-manuals-specifications/article.md b/1-js/01-getting-started/2-manuals-specifications/article.md index 3fa2433363..1796dffd26 100644 --- a/1-js/01-getting-started/2-manuals-specifications/article.md +++ b/1-js/01-getting-started/2-manuals-specifications/article.md @@ -1,37 +1,34 @@ # Manuals and specifications -This book is a *tutorial*. It aims to help you gradually learn the language. But once you're familiar with the basics, you'll need other resources. +You're now reading a *tutorial*. It aims to help you gradually learn the language. Once you're familiar with the basics, you'll need other resources, so here's a brief list. -## Specification - -[The ECMA-262 specification](https://www.ecma-international.org/publications/standards/Ecma-262.htm) contains the most in-depth, detailed and formalized information about JavaScript. It defines the language. +If you're new to JavaScript, then you don't (yet) need them now. But you will need them later, so make a bookmark. -But being that formalized, it's difficult to understand at first. So if you need the most trustworthy source of information about the language details, the specification is the right place. But it's not for everyday use. +## Specification -A new specification version is released every year. Between these releases, the latest specification draft is at . +[The ECMA-262 specification](https://www.ecma-international.org/publications/standards/Ecma-262.htm) is a formal definition of the language. -To read about new bleeding-edge features, including those that are "almost standard" (so-called "stage 3"), see proposals at . +It contains the most in-depth, detailed and formalized information about JavaScript! If you ever need the ultimately trustworthy source of information, the specification is the right place. However, its highly formal writing style makes it difficult to read. So it's not for everyday use. -Also, if you're developing for the browser, then there are other specifications covered in the [second part](info:browser-environment) of the tutorial. +- A new specification version is released every year. Between these releases, the latest specification draft is at . +- To read about new bleeding-edge features, including those that are "almost standard" (so-called "stage 3"), see proposals at . -## Manuals +## MDN manual -- **MDN (Mozilla) JavaScript Reference** is the main manual with examples and other information. It's great to get in-depth information about individual language functions, methods etc. +[MDN (Mozilla) JavaScript Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference) is a great manual with examples. - You can find it at . +It contains a lot of information both about JavaScript and its browser-specific usage. -Although, it's often best to use an internet search instead. Just use "MDN [term]" in the query, e.g. to search for the `parseInt` function. +Instead of accessing it directly, it's often faster to use an internet search, such as Google. Just search for "MDN ..." and the query, for example [MDN parseInt](https://google.com/search?q=MDN+parseInt) to search for the `parseInt` function in MDN. ## Compatibility tables -JavaScript is a developing language, new features get added regularly. - -To see their support among browser-based and other engines, see: +JavaScript continues to evolve, new features get added to the specification (and hence to the language) regularly. -- - per-feature tables of support, e.g. to see which engines support modern cryptography functions: . -- - a table with language features and engines that support those or don't support. +However, when a new feature appears in the specification, it doesn't really mean that everyone can use it. JavaScript engines need time to adopt it. So before actually using a fresh language capability, it's best to make sure that it's well-supported. -All these resources are useful in real-life development, as they contain valuable information about language details, their support, etc. +To see the current state of support, there're two great resources: -Please remember them (or this page) for the cases when you need in-depth information about a particular feature. +- – per-feature tables of support, e.g. to see which engines support modern cryptography functions: . +- – a table with a list of language features and engines that support those or don't support. diff --git a/1-js/01-getting-started/3-code-editors/article.md b/1-js/01-getting-started/3-code-editors/article.md deleted file mode 100644 index ca61947412..0000000000 --- a/1-js/01-getting-started/3-code-editors/article.md +++ /dev/null @@ -1,49 +0,0 @@ -# Code editors - -A code editor is the place where programmers spend most of their time. - -There are two main types of code editors: IDEs and lightweight editors. Many people use one tool of each type. - -## IDE - -The term [IDE](https://en.wikipedia.org/wiki/Integrated_development_environment) (Integrated Development Environment) refers to a powerful editor with many features that usually operates on a "whole project." As the name suggests, it's not just an editor, but a full-scale "development environment." - -An IDE loads the project (which can be many files), allows navigation between files, provides autocompletion based on the whole project (not just the open file), and integrates with a version management system (like [git](https://git-scm.com/)), a testing environment, and other "project-level" stuff. - -If you haven't selected an IDE yet, consider the following options: - -- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free). -- [WebStorm](https://www.jetbrains.com/webstorm/) (cross-platform, paid). - -For Windows, there's also "Visual Studio", not to be confused with "Visual Studio Code". "Visual Studio" is a paid and mighty Windows-only editor, well-suited for the .NET platform. It's also good at JavaScript. There's also a free version [Visual Studio Community](https://www.visualstudio.com/vs/community/). - -Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a qualified developer's salary, so just choose the best one for you. - -## Lightweight editors - -"Lightweight editors" are not as powerful as IDEs, but they're fast, elegant and simple. - -They are mainly used to open and edit a file instantly. - -The main difference between a "lightweight editor" and an "IDE" is that an IDE works on a project-level, so it loads much more data on start, analyzes the project structure if needed and so on. A lightweight editor is much faster if we need only one file. - -In practice, lightweight editors may have a lot of plugins including directory-level syntax analyzers and autocompleters, so there's no strict border between a lightweight editor and an IDE. - -There are many options, for instance: - -- [Sublime Text](https://www.sublimetext.com/) (cross-platform, shareware). -- [Notepad++](https://notepad-plus-plus.org/) (Windows, free). -- [Vim](https://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them. - -## Let's not argue - -The editors in the lists above are those that either I or my friends whom I consider good developers have been using for a long time and are happy with. - -There are other great editors in our big world. Please choose the one you like the most. - -The choice of an editor, like any other tool, is individual and depends on your projects, habits, and personal preferences. - -The author's personal opinion: - -- I'd use [Visual Studio Code](https://code.visualstudio.com/) if I develop mostly frontend. -- Otherwise, if it's mostly another language/platform and partially frontend, then consider other editors, such as XCode (Mac), Visual Studio (Windows) or Jetbrains family (Webstorm, PHPStorm, RubyMine etc, depending on the language). diff --git a/1-js/01-getting-started/3-code-structure/article.md b/1-js/01-getting-started/3-code-structure/article.md new file mode 100644 index 0000000000..ee8f54dd7e --- /dev/null +++ b/1-js/01-getting-started/3-code-structure/article.md @@ -0,0 +1,231 @@ + +# Hello, world! + +Let's start coding! + +You can do it right here, in this tutorial, using the code editor at the right side of this text (if you're using a narrow screen, then use a toggler at the page bottom to switch to the editor). + +Try something, for example type `console.log("Hello, world!")` and click "Run". + +This is a *statement* that outputs a string `"Hello, world!"`. You can see the output produced by this command in the "Console" tab at the bottom. + + +TODO: arrow with "statement" + +![statement|code="1:1"](statement.svg) + +![statement|code="2:2"](statement.svg) + +![statement|code="3:3"](statement.svg) + +![statement|code="4:4"](statement.svg) + +![statement|code="5:5"](statement.svg) + +![statement|code="6:6"](statement.svg) + +![statement|code="7:7"](statement.svg) + +```js +console.log('Hello 1'); +console.log('Hello 2'); +console.log('Hello 3'); +console.log('Hello 4'); +console.log('Hello 5'); +console.log('Hello 6'); +console.log('Hello 7'); +``` + +## Statements + +Statements are syntax constructs and commands that perform actions. + +We've already seen a statement, `console.log('Hello, world!')`, which shows the message "Hello, world!". + +We can have as many statements in our code as we want. Statements can be separated with a semicolon. + +For example, let's split "Hello World" into two outputs: + +TODO: arrows with "statement" + +```js run no-beautify +*!*console.log('Hello')*/!*; *!*console.log('World')*/!*; +``` + +A semicolon signals the end of the first statement, so that we can start with the second. + +Usually, statements are written on separate lines to make the code more readable: + +```js run no-beautify +console.log('Hello'); +console.log('World'); +``` + +### Are semicolons necessary? [#semicolon] + +A newline usually implies a semicolon. In other words, when a line ends, JavaScript automatically assumes that there's a semicolon there. This language feature is called an [automatic semicolon insertion](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion). + +The same code will still work if we cut out the semicolons: + +```js run no-beautify +console.log('Hello') +console.log('World') +``` + + +However, there are situations when a newline doesn't mean a statement end. + +Such as this: + +```js run no-beautify +console.log(3 + +1 ++ 2); +``` + +This is a single statement which spans on multiple lines. It outputs `6`. + +It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so a semicolon there is not needed. + +JavaScript has intricate internal rules to figure out rare cases a newline doesn't mean the "statement end", but they are not 100% reliable. In this particular case it gets things right. However, it's not always so. + +To avoid any issues, it's recommended to be explicit: always put a semicolon at a statement end. + +````smart header="An example of an error caused by an omitted semicolon" +Let's see an example of a situation when JavaScript syntax rules do not align with a programmer's intention, and an omitted semicolon causes an error. + +Run this code: + +```js run +console.log("Hello"); + +[1, 2].forEach(console.log); +``` + +No need to think about the meaning of the brackets `[]` and `forEach` yet. We'll study them later. For now, just remember the result of running the code: it shows `Hello`, then two more lines. + +Now let's say a lazy programmer forgot to put the semicolon after the `console.log`: + +```js run no-beautify +console.log("Hello") + +[1, 2].forEach(console.log); +``` + +The difference compared to the code above is only one character: the semicolon at the end of the first line is gone. + +If we run this code, only the first `Hello` shows and no more lines – that's because of an error. + +In our last example, JavaScript assumes that a square bracket `[` means that the expression has not ended yet, and so doesn't auto-insert the semicolon, similar to the plus `+` character before. + +So, the code in the last example is treated as a single statement. + +Here's how the engine sees it: + +```js run no-beautify +console.log("Hello")[1, 2].forEach(console.log); +``` + +Looks weird, right? Such merging in this case is just wrong. We need to put a semicolon after `console.log` for the code to work correctly. + +This can happen in other situations also. +```` + +We recommend putting semicolons between statements even if they are separated by newlines. This rule is widely adopted by the community. To put it short -- *it is possible* to leave out semicolons most of the time. But it's safer -- especially for a beginner -- to use them. + +## Comments [#code-comments] + +As time goes on, programs become more and more complex. It becomes necessary to add *comments* which describe what the code does and why. + +Comments can be put into any place of a script. They don't affect its execution because the engine simply ignores them. + +**One-line comments start with two forward slash characters `//`.** + +The rest of the line is a comment. It may occupy a full line of its own or follow a statement. + +Like here: + +TODO: comment picture + +```js run +*!* +// This comment occupies a line of its own +*/!* +console.log('Hello'); + +console.log('World'); *!*// This comment follows the statement*/!* +``` + +**Multiline comments start with a forward slash and an asterisk /* and end with an asterisk and a forward slash */.** + +Like this: + +TODO: comment picture + +```js run +*!* +/* An example with two messages. +This is a multiline comment. +*/ +*/!* +console.log('Hello'); +console.log('World'); +``` + +The content of comments is ignored, so if we put code inside /* ... */, it won't execute. + +Sometimes it can be handy to temporarily disable ("comment out") a part of code: + +TODO: comment picture + +```js run +*!* +/* +console.log('Hello'); +*/ +*/!* +console.log('World'); +``` + +```smart header="Use hotkeys!" +In most editors, a line of code can be commented out by pressing the `key:Ctrl+/` hotkey for a single-line comment and something like `key:Ctrl+Shift+/` -- for multiline comments (select a piece of code and press the hotkey). For Mac, try `key:Cmd` instead of `key:Ctrl` and `key:Option` instead of `key:Shift`. +``` + +````warn header="Nested comments are not supported!" +There may not be `/*...*/` inside another `/*...*/`. + +Such code will exit with a syntax error: + +```js run no-beautify +/* + /* nested comment ?!? */ +*/ +console.log( 'World' ); +``` +```` + +Please, don't hesitate to comment your code. + +Comments increase the overall code length, but that's not a problem at all. There are many tools which minify code before publishing to a production server. They remove comments, so they don't appear in the working scripts. Therefore, comments do not have negative effects on production at all. + +## Strict mode + +...And a one more minor thing. + +Sometimes you may see scripts starting with the line `"use strict";`. + +```js +"use strict"; + +// ...the code... +``` + +This is a so-called "strict directive". It switches the script to the "strict mode", which actually isn't that strict. It simply switches a few language features to behave in modern and correct way. + +This mode is enabled automatically when a script uses modules, classes and some other modern syntax. So this directive is rarely needed. + +However, if you run a very simple script without this directive, for example just to test how things work, then it may run in the "old mode". + +To avoid confusion, we will specifically mention language features which behave differently in the old mode. Luckily, there're only a few of them, and the difference is small. + +All code in this tutorial assumes strict mode, unless specified otherwise. diff --git a/1-js/01-getting-started/3-code-structure/statement.svg b/1-js/01-getting-started/3-code-structure/statement.svg new file mode 100644 index 0000000000..65d3d8f134 --- /dev/null +++ b/1-js/01-getting-started/3-code-structure/statement.svg @@ -0,0 +1,11 @@ + + +statement + + + + + + + + diff --git a/1-js/01-getting-started/4-devtools/article.md b/1-js/01-getting-started/4-devtools/article.md deleted file mode 100644 index 50926d4f76..0000000000 --- a/1-js/01-getting-started/4-devtools/article.md +++ /dev/null @@ -1,63 +0,0 @@ -# Developer console - -Code is prone to errors. You will quite likely make errors... Oh, what am I talking about? You are *absolutely* going to make errors, at least if you're a human, not a [robot](https://en.wikipedia.org/wiki/Bender_(Futurama)). - -But in the browser, users don't see errors by default. So, if something goes wrong in the script, we won't see what's broken and can't fix it. - -To see errors and get a lot of other useful information about scripts, "developer tools" have been embedded in browsers. - -Most developers lean towards Chrome or Firefox for development because those browsers have the best developer tools. Other browsers also provide developer tools, sometimes with special features, but are usually playing "catch-up" to Chrome or Firefox. So most developers have a "favorite" browser and switch to others if a problem is browser-specific. - -Developer tools are potent; they have many features. To start, we'll learn how to open them, look at errors, and run JavaScript commands. - -## Google Chrome - -Open the page [bug.html](bug.html). - -There's an error in the JavaScript code on it. It's hidden from a regular visitor's eyes, so let's open developer tools to see it. - -Press `key:F12` or, if you're on Mac, then `key:Cmd+Opt+J`. - -The developer tools will open on the Console tab by default. - -It looks somewhat like this: - -![chrome](chrome.png) - -The exact look of developer tools depends on your version of Chrome. It changes from time to time but should be similar. - -- Here we can see the red-colored error message. In this case, the script contains an unknown "lalala" command. -- On the right, there is a clickable link to the source `bug.html:12` with the line number where the error has occurred. - -Below the error message, there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands. Press `key:Enter` to run them. - -Now we can see errors, and that's enough for a start. We'll come back to developer tools later and cover debugging more in-depth in the chapter . - -```smart header="Multi-line input" -Usually, when we put a line of code into the console, and then press `key:Enter`, it executes. - -To insert multiple lines, press `key:Shift+Enter`. This way one can enter long fragments of JavaScript code. -``` - -## Firefox, Edge, and others - -Most other browsers use `key:F12` to open developer tools. - -The look & feel of them is quite similar. Once you know how to use one of these tools (you can start with Chrome), you can easily switch to another. - -## Safari - -Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first. - -Open Preferences and go to the "Advanced" pane. There's a checkbox at the bottom: - -![safari](safari.png) - -Now `key:Cmd+Opt+C` can toggle the console. Also, note that the new top menu item named "Develop" has appeared. It has many commands and options. - -## Summary - -- Developer tools allow us to see errors, run commands, examine variables, and much more. -- They can be opened with `key:F12` for most browsers on Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first). - -Now we have the environment ready. In the next section, we'll get down to JavaScript. diff --git a/1-js/01-getting-started/4-devtools/bug.html b/1-js/01-getting-started/4-devtools/bug.html deleted file mode 100644 index edb02375ca..0000000000 --- a/1-js/01-getting-started/4-devtools/bug.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - There is an error in the script on this page. - - - - - \ No newline at end of file diff --git a/1-js/01-getting-started/4-devtools/chrome.png b/1-js/01-getting-started/4-devtools/chrome.png deleted file mode 100644 index 4cb3ea2f46..0000000000 Binary files a/1-js/01-getting-started/4-devtools/chrome.png and /dev/null differ diff --git a/1-js/01-getting-started/4-devtools/chrome@2x.png b/1-js/01-getting-started/4-devtools/chrome@2x.png deleted file mode 100644 index b87404a8f4..0000000000 Binary files a/1-js/01-getting-started/4-devtools/chrome@2x.png and /dev/null differ diff --git a/1-js/01-getting-started/4-devtools/safari.png b/1-js/01-getting-started/4-devtools/safari.png deleted file mode 100644 index 64c7a3f6ca..0000000000 Binary files a/1-js/01-getting-started/4-devtools/safari.png and /dev/null differ diff --git a/1-js/01-getting-started/4-devtools/safari@2x.png b/1-js/01-getting-started/4-devtools/safari@2x.png deleted file mode 100644 index 27def4d09b..0000000000 Binary files a/1-js/01-getting-started/4-devtools/safari@2x.png and /dev/null differ diff --git a/1-js/01-getting-started/4-hello-world/article.md b/1-js/01-getting-started/4-hello-world/article.md new file mode 100644 index 0000000000..0a8a4af75a --- /dev/null +++ b/1-js/01-getting-started/4-hello-world/article.md @@ -0,0 +1,9 @@ +# My first code + +In this tutorial you don't just get the knowledge. You need to apply it as well, this is the only way to ensure you really get things right. + +This can be done using the editor at the right side of this page. + +To try things out, write the code to output "Hello, World" and press "run". + +Also run tests. diff --git a/1-js/01-getting-started/4-hello-world/solution.js b/1-js/01-getting-started/4-hello-world/solution.js new file mode 100644 index 0000000000..ed54d039cc --- /dev/null +++ b/1-js/01-getting-started/4-hello-world/solution.js @@ -0,0 +1,3 @@ +// Write your code here + +console.log("Hello, World"); \ No newline at end of file diff --git a/1-js/01-getting-started/4-hello-world/source.js b/1-js/01-getting-started/4-hello-world/source.js new file mode 100644 index 0000000000..7056c69324 --- /dev/null +++ b/1-js/01-getting-started/4-hello-world/source.js @@ -0,0 +1 @@ +// Write your code here \ No newline at end of file diff --git a/1-js/02-first-steps/04-variables/1-hello-variables/solution.md b/1-js/01-getting-started/5-variables/1-hello-variables/solution.md similarity index 100% rename from 1-js/02-first-steps/04-variables/1-hello-variables/solution.md rename to 1-js/01-getting-started/5-variables/1-hello-variables/solution.md diff --git a/1-js/02-first-steps/04-variables/1-hello-variables/task.md b/1-js/01-getting-started/5-variables/1-hello-variables/task.md similarity index 100% rename from 1-js/02-first-steps/04-variables/1-hello-variables/task.md rename to 1-js/01-getting-started/5-variables/1-hello-variables/task.md diff --git a/1-js/02-first-steps/04-variables/2-declare-variables/solution.md b/1-js/01-getting-started/5-variables/2-declare-variables/solution.md similarity index 100% rename from 1-js/02-first-steps/04-variables/2-declare-variables/solution.md rename to 1-js/01-getting-started/5-variables/2-declare-variables/solution.md diff --git a/1-js/02-first-steps/04-variables/2-declare-variables/task.md b/1-js/01-getting-started/5-variables/2-declare-variables/task.md similarity index 100% rename from 1-js/02-first-steps/04-variables/2-declare-variables/task.md rename to 1-js/01-getting-started/5-variables/2-declare-variables/task.md diff --git a/1-js/02-first-steps/04-variables/3-uppercast-constant/solution.md b/1-js/01-getting-started/5-variables/3-uppercast-constant/solution.md similarity index 100% rename from 1-js/02-first-steps/04-variables/3-uppercast-constant/solution.md rename to 1-js/01-getting-started/5-variables/3-uppercast-constant/solution.md diff --git a/1-js/02-first-steps/04-variables/3-uppercast-constant/task.md b/1-js/01-getting-started/5-variables/3-uppercast-constant/task.md similarity index 100% rename from 1-js/02-first-steps/04-variables/3-uppercast-constant/task.md rename to 1-js/01-getting-started/5-variables/3-uppercast-constant/task.md diff --git a/1-js/01-getting-started/5-variables/article.md b/1-js/01-getting-started/5-variables/article.md new file mode 100644 index 0000000000..95680f7fc6 --- /dev/null +++ b/1-js/01-getting-started/5-variables/article.md @@ -0,0 +1,203 @@ +# Variables + +If we want to create a JavaScript application bigger than "Hello, World", we need variables. + +A [variable](https://en.wikipedia.org/wiki/Variable_(computer_science)) is a "named storage" for data. + +For example: +1. An online shop -- variables can store information about goods being sold and a shopping cart. +2. A chat application -- variables store information about users, messages, and much more. + +## Declaration + +To create a variable in JavaScript, use the `let` keyword. + +The statement below creates (in other words: *declares*) a variable with the name "message": + +```js +let message; +``` + +One can think of a variable as a "box" for data, with a uniquely-named sticker on it. + +We've just created such box: + +![](variable-message.svg) + +We can put any value in the box using an assignment `=`. + +For instance, let's store a string `Hello!`. + +```js run +let message; + +message = 'Hello!'; +``` + +![](variable.svg) + +The string is now saved into the memory area associated with the variable. We can access it using the variable name: + +```js run +let message; + +message = 'Hello!'; + +*!* +console.log(message); // shows the variable content +*/!* +``` + +To be concise, we can combine the variable declaration and assignment into a single line: + +```js run +*!* +let message = 'Hello!'; // define the variable and assign the value +*/!* + +console.log(message); // Hello! +``` + +We can also change it as many times as we want: + +```js run +let message; + +message = 'Hello!'; + +*!* +message = 'World!'; // value changed +*/!* + +console.log(message); // World! +``` + +When the value is changed, the old data is automatically removed from the variable: + +![](variable-change.svg) + + +We can also declare two variables and copy data from one into the other. + +```js run +let hello = 'Hello world!'; + +let message; + +*!* +// copy 'Hello world' from hello +message = hello; +*/!* + +// now two variables hold the same data +console.log(hello); // Hello world! +console.log(message); // Hello world! +``` + +````warn header="Declaring twice triggers an error" +A variable should be declared only once. + +A repeated declaration of the same variable is an error: + +```js run +let message = "This"; + +// repeated 'let' leads to an error +let message = "That"; // SyntaxError: 'message' has already been declared +``` +So, the variable should be declared once, and then we can assign to it (or use otherwise) without `let`. +```` + +```smart header="The outdated `var` keyword" +A long time ago, JavaScript used another keyword: `var` to declare variables. It still works. + +However, there're subtle differences between `var` and `let`, in short: `let` is better, while `var` is an artifact from the past of JavaScript. Nowadays, people don't `var` it any more, so neither will we. + +The only reason to mention `var` is that you may see it in some really old scripts. +``` + +## Variable naming [#variable-naming] + +There are two limitations on variable names: + +1. The name must contain only letters, digits, or the symbols `$` and `_`. +2. The first character must not be a digit. + +Examples of valid names: + +```js +let userName; +let test123; +``` + +When the name contains multiple words, [camelCase](https://en.wikipedia.org/wiki/CamelCase) is commonly used. That is: words go one after another, each word except first starting with a capital letter: `myVeryLongName`. + +What's interesting -- the dollar sign `'$'` and the underscore `'_'` can also be used in names. They are regular symbols, just like letters, without any special meaning. + +These names are valid: + +```js run untrusted +let $ = 1; // declared a variable with the name "$" +let _ = 2; // and now a variable with the name "_" + +// these variables are regular, such characters have no special meaning +console.log($ + _); // 3 +``` + +Examples of incorrect variable names: + +```js no-beautify +let 1a; // cannot start with a digit + +let my-name; // hyphens '-' aren't allowed in the name +``` + +```smart header="Case matters" +Variables named `apple` and `APPLE` are two different variables. +``` + +````smart header="Non-Latin letters are allowed, but not recommended" +It is possible to use any language, including Cyrillic letters, Chinese logograms and so on, like this: + +```js +let имя = '...'; +let 我 = '...'; +``` + +Technically, there is no error here. However, there is an international convention to use English in variable names. Even if we're writing a small script, it may have a long life ahead. People from other countries may need to read it sometime. +```` + +````warn header="Reserved names" +There is a [list of reserved words](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords), which cannot be used as variable names because they are used by the language itself. + +For example: `let`, `class`, `return`, and `function` are reserved. + +The code below gives a syntax error: + +```js run no-beautify +let let = 5; // can't name a variable "let", error! +let return = 5; // also can't name it "return", error! +``` +```` + +````warn header="An assignment without `use strict`" +Normally, we need to define a variable before using it. But in the old times, it was technically possible to create a variable by a mere assignment of the value without using `let`. This still works now if we don't put `use strict` in our scripts to maintain compatibility with old scripts. + +```js run no-strict +// note: no "use strict" in this example + +num = 5; // the variable "num" is created if it didn't exist + +console.log(num); // 5 +``` + +This is a bad practice and would cause an error in strict mode: + +```js run +"use strict"; + +*!* +num = 5; // error: num is not defined +*/!* +``` +```` diff --git a/1-js/01-getting-started/5-variables/variable-change.svg b/1-js/01-getting-started/5-variables/variable-change.svg new file mode 100644 index 0000000000..7bcf5c48d7 --- /dev/null +++ b/1-js/01-getting-started/5-variables/variable-change.svg @@ -0,0 +1,53 @@ + + + + + + + + + + "World!" + + + + + "Hello!" + + + + + message + + + + + + + + + \ No newline at end of file diff --git a/1-js/01-getting-started/5-variables/variable-message.svg b/1-js/01-getting-started/5-variables/variable-message.svg new file mode 100644 index 0000000000..b9b8e2f35c --- /dev/null +++ b/1-js/01-getting-started/5-variables/variable-message.svg @@ -0,0 +1 @@ +message \ No newline at end of file diff --git a/1-js/01-getting-started/5-variables/variable.svg b/1-js/01-getting-started/5-variables/variable.svg new file mode 100644 index 0000000000..52c409d8ac --- /dev/null +++ b/1-js/01-getting-started/5-variables/variable.svg @@ -0,0 +1 @@ +"Hello!"message \ No newline at end of file diff --git a/1-js/01-getting-started/6-constants/article.md b/1-js/01-getting-started/6-constants/article.md new file mode 100644 index 0000000000..29a8c31418 --- /dev/null +++ b/1-js/01-getting-started/6-constants/article.md @@ -0,0 +1,56 @@ +# Constants + +To declare a constant (unchanging) variable, use `const` instead of `let`: + +```js +const myBirthDate = '18.04.1982'; +``` + +Variables declared using `const` are called "constants". They cannot be reassigned. An attempt to do so would cause an error: + +```js run +const myBirthDate = '18.04.1982'; + +myBirthDate = '01.01.2001'; // error, can't reassign the constant! +``` + +When we are sure that a variable must never change, we should declare it with `const` – not only to technically guarantee it, but also to clearly communicate this fact to future readers and maintainers of our code. + +## Uppercase constants + +There is a widespread practice to use constants as aliases for difficult-to-remember values. + +Such constants are named using capital letters and underscores. + +For instance, let's make constants for colors in so-called "web" (hexadecimal) format: + +```js run +const COLOR_RED = "#F00"; +const COLOR_GREEN = "#0F0"; +const COLOR_BLUE = "#00F"; +const COLOR_ORANGE = "#FF7F00"; + +// ...when we need to pick a color +let color = COLOR_ORANGE; +console.log(color); // #FF7F00 +``` + +Benefits: + +- `COLOR_ORANGE` is much easier to remember than `"#FF7F00"`. +- It is much easier to mistype in `"#FF7F00"` than in `COLOR_ORANGE`. +- When reading the code, `COLOR_ORANGE` is much more meaningful than `#FF7F00`. + +When should we use capitals for a constant? Let's make that clear. + +Being a "constant" just means that a variable's value never changes. But some constants are known before execution. People also call them "hard-coded", because their values (such as the hexadecimal value for red) are embedded into the code. For them we should use capital letters. + +On the other hand, some constants are *calculated* at run time, during the execution, but do not change after their initial assignment. + +For instance, after a web page is loaded, we can store the time it took into a variable: + +```js +const pageLoadTime = /* time taken by a webpage to load */; +``` + +The value of `pageLoadTime` will never change, so it's a constant. However, it's not known before the execution, it's not "hard-coded", this is why its name is not capitalized. diff --git a/1-js/02-first-steps/05-types/1-string-quotes/solution.md b/1-js/01-getting-started/7-types/1-string-quotes/solution.md similarity index 100% rename from 1-js/02-first-steps/05-types/1-string-quotes/solution.md rename to 1-js/01-getting-started/7-types/1-string-quotes/solution.md diff --git a/1-js/02-first-steps/05-types/1-string-quotes/task.md b/1-js/01-getting-started/7-types/1-string-quotes/task.md similarity index 100% rename from 1-js/02-first-steps/05-types/1-string-quotes/task.md rename to 1-js/01-getting-started/7-types/1-string-quotes/task.md diff --git a/1-js/02-first-steps/05-types/article.md b/1-js/01-getting-started/7-types/article.md similarity index 70% rename from 1-js/02-first-steps/05-types/article.md rename to 1-js/01-getting-started/7-types/article.md index 26f3bcd53d..7d3d91798a 100644 --- a/1-js/02-first-steps/05-types/article.md +++ b/1-js/01-getting-started/7-types/article.md @@ -2,9 +2,11 @@ A value in JavaScript is always of a certain type. For example, a string or a number. -There are eight basic data types in JavaScript. Here, we'll cover them in general and in the next chapters we'll talk about each of them in detail. +There are 8 basic data types in JavaScript. Here we'll introduce them, and in the next chapters we'll talk about each of them in detail. -We can put any type in a variable. For example, a variable can at one moment be a string and then store a number: +JavaScript is a "dynamically typed" language. It means that a variable can store a value of any type, and it can change dynamically during execition. + +For example, `message` can store a string, and then be reassigned to a number: ```js // no error @@ -12,8 +14,6 @@ let message = "hello"; message = 123456; ``` -Programming languages that allow such things, such as JavaScript, are called "dynamically typed", meaning that there exist data types, but variables are not bound to any of them. - ## Number ```js @@ -32,29 +32,33 @@ Besides regular numbers, there are so-called "special numeric values" which also We can get it as a result of division by zero: ```js run - alert( 1 / 0 ); // Infinity + console.log( 1 / 0 ); // Infinity ``` Or just reference it directly: ```js run - alert( Infinity ); // Infinity + console.log( Infinity ); // Infinity ``` - `NaN` represents a computational error. It is a result of an incorrect or an undefined mathematical operation, for instance: ```js run - alert( "not a number" / 2 ); // NaN, such division is erroneous + console.log( "hello" / 2 ); // NaN, such division is erroneous ``` - `NaN` is sticky. Any further mathematical operation on `NaN` returns `NaN`: + `NaN` is "sticky". Any further mathematical operation on `NaN` returns `NaN`: ```js run - alert( NaN + 1 ); // NaN - alert( 3 * NaN ); // NaN - alert( "not a number" / 2 - 1 ); // NaN + console.log( NaN + 1 ); // NaN + console.log( 3 * NaN ); // NaN + console.log( "hello" / 2 - 1 ); // NaN + + // The only exception to this rule is: + console.log( NaN ** 0 ); // 1 + // the double star ** is a "raising to power" operation ``` - So, if there's a `NaN` somewhere in a mathematical expression, it propagates to the whole result (there's only one exception to that: `NaN ** 0` is `1`). + This is natural, because `NaN` value represents an error, and there's no sense in doing computations with an error. So, if there's a `NaN` somewhere in a mathematical expression, it propagates to the whole result. ```smart header="Mathematical operations are safe" Doing maths is "safe" in JavaScript. We can do anything: divide by zero, treat non-numeric strings as numbers, etc. @@ -64,51 +68,38 @@ The script will never stop with a fatal error ("die"). At worst, we'll get `NaN` Special numeric values formally belong to the "number" type. Of course they are not numbers in the common sense of this word. -We'll see more about working with numbers in the chapter . - ## BigInt [#bigint-type] -In JavaScript, the "number" type cannot safely represent integer values larger than (253-1) (that's `9007199254740991`), or less than -(253-1) for negatives. +In JavaScript, the "number" type cannot safely represent integer values larger than (253-1) (that's `9007199254740991`), or less than -(253-1) for negatives. There's a similar limitation for floating type values as well. -To be really precise, the "number" type can store larger integers (up to 1.7976931348623157 * 10308), but outside of the safe integer range ±(253-1) there'll be a precision error, because not all digits fit into the fixed 64-bit storage. So an "approximate" value may be stored. +Technically, we can assigns any numeric value, and there won't be an error. However, if the number is outside of this range, then some digits "won't fit" and will be lost, so we'll see an "approximate" value when we try to read from it. -For example, these two numbers (right above the safe range) are the same: +For example, let's try to store these two numbers, which are right above the safe range: ```js console.log(9007199254740991 + 1); // 9007199254740992 console.log(9007199254740991 + 2); // 9007199254740992 ``` -So to say, all odd integers greater than (253-1) can't be stored at all in the "number" type. +As you can see, both outputs are identical. This is exactly for this reason – they don't fit and a tiny bit of precision is lost. -For most purposes ±(253-1) range is quite enough, but sometimes we need the entire range of really big integers, e.g. for cryptography or microsecond-precision timestamps. +For most real-life purposes ±(253-1) range is quite enough. However, sometimes we need to work with really big numbers, e.g. for cryptography purposes or to store a time with microsecond precision. -`BigInt` type was recently added to the language to represent integers of arbitrary length. +`BigInt` type can represent integers of arbitrary length. A `BigInt` value is created by appending `n` to the end of an integer: ```js // the "n" at the end means it's a BigInt -const bigInt = 1234567890123456789012345678901234567890n; +const bigInt = 1234567890123456789012345678901234567890*!*n*/!*; ``` -As `BigInt` numbers are rarely needed, we don't cover them here, but devoted them a separate chapter . Read it when you need such big numbers. - - -```smart header="Compatibility issues" -Right now, `BigInt` is supported in Firefox/Chrome/Edge/Safari, but not in IE. -``` - -You can check [*MDN* BigInt compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) to know which versions of a browser are supported. - ## String -A string in JavaScript must be surrounded by quotes. +A string in JavaScript must be enclosed into quotes, like this: ```js let str = "Hello"; -let str2 = 'Single quotes are ok too'; -let phrase = `can embed another ${str}`; ``` In JavaScript, there are 3 types of quotes. @@ -117,7 +108,7 @@ In JavaScript, there are 3 types of quotes. 2. Single quotes: `'Hello'`. 3. Backticks: `Hello`. -Double and single quotes are "simple" quotes. There's practically no difference between them in JavaScript. +Double and single quotes are "simple" quotes. There's no difference between them in JavaScript, besides being different characters. Backticks are "extended functionality" quotes. They allow us to embed variables and expressions into a string by wrapping them in `${…}`, for example: @@ -125,17 +116,17 @@ Backticks are "extended functionality" quotes. They allow us to embed variables let name = "John"; // embed a variable -alert( `Hello, *!*${name}*/!*!` ); // Hello, John! +console.log( `Hello, *!*${name}*/!*!` ); // Hello, John! // embed an expression -alert( `the result is *!*${1 + 2}*/!*` ); // the result is 3 +console.log( `the result is *!*${1 + 2}*/!*` ); // the result is 3 ``` The expression inside `${…}` is evaluated and the result becomes a part of the string. We can put anything in there: a variable like `name` or an arithmetical expression like `1 + 2` or something more complex. Please note that this can only be done in backticks. Other quotes don't have this embedding functionality! ```js run -alert( "the result is ${1 + 2}" ); // the result is ${1 + 2} (double quotes do nothing) +console.log( "the result is ${1 + 2}" ); // the result is ${1 + 2} (double quotes do nothing) ``` We'll cover strings more thoroughly in the chapter . @@ -164,7 +155,7 @@ Boolean values also come as a result of comparisons: ```js run let isGreater = 4 > 1; -alert( isGreater ); // true (the comparison result is "yes") +console.log( isGreater ); // true (the comparison result is "yes") ``` We'll cover booleans more deeply in the chapter . @@ -196,7 +187,7 @@ If a variable is declared, but not assigned, then its value is `undefined`: ```js run let age; -alert(age); // shows "undefined" +console.log(age); // shows "undefined" ``` Technically, it is possible to explicitly assign `undefined` to a variable: @@ -207,7 +198,7 @@ let age = 100; // change the value to undefined age = undefined; -alert(age); // "undefined" +console.log(age); // "undefined" ``` ...But we don't recommend doing that. Normally, one uses `null` to assign an "empty" or "unknown" value to a variable, while `undefined` is reserved as a default initial value for unassigned things. @@ -250,7 +241,7 @@ typeof null // "object" (2) */!* *!* -typeof alert // "function" (3) +typeof console.log // "function" (3) */!* ``` @@ -258,7 +249,7 @@ The last three lines may need additional explanation: 1. `Math` is a built-in object that provides mathematical operations. We will learn it in the chapter . Here, it serves just as an example of an object. 2. The result of `typeof null` is `"object"`. That's an officially recognized error in `typeof`, coming from very early days of JavaScript and kept for compatibility. Definitely, `null` is not an object. It is a special value with a separate type of its own. The behavior of `typeof` is wrong here. -3. The result of `typeof alert` is `"function"`, because `alert` is a function. We'll study functions in the next chapters where we'll also see that there's no special "function" type in JavaScript. Functions belong to the object type. But `typeof` treats them differently, returning `"function"`. That also comes from the early days of JavaScript. Technically, such behavior isn't correct, but can be convenient in practice. +3. The result of `typeof console.log` is `"function"`, because `console.log` is a function. We'll study functions in the next chapters where we'll also see that there's no special "function" type in JavaScript. Functions belong to the object type. But `typeof` treats them differently, returning `"function"`. That also comes from the early days of JavaScript. Technically, such behavior isn't correct, but can be convenient in practice. ```smart header="The `typeof(x)` syntax" You may also come across another syntax: `typeof(x)`. It's the same as `typeof x`. diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html b/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html deleted file mode 100644 index ff1d871b08..0000000000 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.md b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.md deleted file mode 100644 index 81552913b9..0000000000 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.md +++ /dev/null @@ -1,2 +0,0 @@ - -[html src="http://github.com/index.html"] diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html b/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html deleted file mode 100644 index 45e6744b3a..0000000000 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/solution.view/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md b/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md deleted file mode 100644 index afed6a91d3..0000000000 --- a/1-js/02-first-steps/01-hello-world/1-hello-alert/task.md +++ /dev/null @@ -1,12 +0,0 @@ -importance: 5 - ---- - -# Show an alert - -Create a page that shows a message "I'm JavaScript!". - -Do it in a sandbox, or on your hard drive, doesn't matter, just ensure that it works. - -[demo src="http://github.com/solution"] - diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js deleted file mode 100644 index 4de725971d..0000000000 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/alert.js +++ /dev/null @@ -1 +0,0 @@ -alert("I'm JavaScript!"); \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/index.html b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/index.html deleted file mode 100644 index 10895f8fe2..0000000000 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md deleted file mode 100644 index f42c41e6db..0000000000 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/solution.md +++ /dev/null @@ -1,8 +0,0 @@ -The HTML code: - -[html src="http://github.com/index.html"] - -For the file `alert.js` in the same folder: - -[js src="http://github.com/alert.js"] - diff --git a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md b/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md deleted file mode 100644 index 26168d6a76..0000000000 --- a/1-js/02-first-steps/01-hello-world/2-hello-alert-ext/task.md +++ /dev/null @@ -1,9 +0,0 @@ -importance: 5 - ---- - -# Show an alert with an external script - -Take the solution of the previous task . Modify it by extracting the script content into an external file `alert.js`, residing in the same folder. - -Open the page, ensure that the alert works. diff --git a/1-js/02-first-steps/01-hello-world/article.md b/1-js/02-first-steps/01-hello-world/article.md deleted file mode 100644 index 35f82bf5d7..0000000000 --- a/1-js/02-first-steps/01-hello-world/article.md +++ /dev/null @@ -1,132 +0,0 @@ -# Hello, world! - -This part of the tutorial is about core JavaScript, the language itself. - -But we need a working environment to run our scripts and, since this book is online, the browser is a good choice. We'll keep the amount of browser-specific commands (like `alert`) to a minimum so that you don't spend time on them if you plan to concentrate on another environment (like Node.js). We'll focus on JavaScript in the browser in the [next part](/ui) of the tutorial. - -So first, let's see how we attach a script to a webpage. For server-side environments (like Node.js), you can execute the script with a command like `"node my.js"`. - - -## The "script" tag - -JavaScript programs can be inserted almost anywhere into an HTML document using the ` -*/!* - -

...After the script.

- - - - -``` - -```online -You can run the example by clicking the "Play" button in the right-top corner of the box above. -``` - -The ` - ``` - - This trick isn't used in modern JavaScript. These comments hide JavaScript code from old browsers that didn't know how to process the ` -``` - -Here, `/path/to/script.js` is an absolute path to the script from the site root. One can also provide a relative path from the current page. For instance, `src="http://github.com/script.js"`, just like `src="http://github.com/script.js"`, would mean a file `"script.js"` in the current folder. - -We can give a full URL as well. For instance: - -```html - -``` - -To attach several scripts, use multiple tags: - -```html - - -… -``` - -```smart -As a rule, only the simplest scripts are put into HTML. More complex ones reside in separate files. - -The benefit of a separate file is that the browser will download it and store it in its [cache](https://en.wikipedia.org/wiki/Web_cache). - -Other pages that reference the same script will take it from the cache instead of downloading it, so the file is actually downloaded only once. - -That reduces traffic and makes pages faster. -``` - -````warn header="If `src` is set, the script content is ignored." -A single ` -``` - -We must choose either an external ` - -``` -```` - -## Summary - -- We can use a ``. - - -There is much more to learn about browser scripts and their interaction with the webpage. But let's keep in mind that this part of the tutorial is devoted to the JavaScript language, so we shouldn't distract ourselves with browser-specific implementations of it. We'll be using the browser as a way to run JavaScript, which is very convenient for online reading, but only one of many. diff --git a/1-js/02-first-steps/02-structure/article.md b/1-js/02-first-steps/02-structure/article.md deleted file mode 100644 index e81fd343df..0000000000 --- a/1-js/02-first-steps/02-structure/article.md +++ /dev/null @@ -1,155 +0,0 @@ -# Code structure - -The first thing we'll study is the building blocks of code. - -## Statements - -Statements are syntax constructs and commands that perform actions. - -We've already seen a statement, `alert('Hello, world!')`, which shows the message "Hello, world!". - -We can have as many statements in our code as we want. Statements can be separated with a semicolon. - -For example, here we split "Hello World" into two alerts: - -```js run no-beautify -alert('Hello'); alert('World'); -``` - -Usually, statements are written on separate lines to make the code more readable: - -```js run no-beautify -alert('Hello'); -alert('World'); -``` - -## Semicolons [#semicolon] - -A semicolon may be omitted in most cases when a line break exists. - -This would also work: - -```js run no-beautify -alert('Hello') -alert('World') -``` - -Here, JavaScript interprets the line break as an "implicit" semicolon. This is called an [automatic semicolon insertion](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion). - -**In most cases, a newline implies a semicolon. But "in most cases" does not mean "always"!** - -There are cases when a newline does not mean a semicolon. For example: - -```js run no-beautify -alert(3 + -1 -+ 2); -``` - -The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so a semicolon there would be incorrect. And in this case, that works as intended. - -**But there are situations where JavaScript "fails" to assume a semicolon where it is really needed.** - -Errors which occur in such cases are quite hard to find and fix. - -````smart header="An example of an error" -If you're curious to see a concrete example of such an error, check this code out: - -```js run -alert("Hello"); - -[1, 2].forEach(alert); -``` - -No need to think about the meaning of the brackets `[]` and `forEach` yet. We'll study them later. For now, just remember the result of running the code: it shows `Hello`, then `1`, then `2`. - -Now let's remove the semicolon after the `alert`: - -```js run no-beautify -alert("Hello") - -[1, 2].forEach(alert); -``` - -The difference compared to the code above is only one character: the semicolon at the end of the first line is gone. - -If we run this code, only the first `Hello` shows (and there's an error, you may need to open the console to see it). There are no numbers any more. - -That's because JavaScript does not assume a semicolon before square brackets `[...]`. So, the code in the last example is treated as a single statement. - -Here's how the engine sees it: - -```js run no-beautify -alert("Hello")[1, 2].forEach(alert); -``` - -Looks weird, right? Such merging in this case is just wrong. We need to put a semicolon after `alert` for the code to work correctly. - -This can happen in other situations also. -```` - -We recommend putting semicolons between statements even if they are separated by newlines. This rule is widely adopted by the community. Let's note once again -- *it is possible* to leave out semicolons most of the time. But it's safer -- especially for a beginner -- to use them. - -## Comments [#code-comments] - -As time goes on, programs become more and more complex. It becomes necessary to add *comments* which describe what the code does and why. - -Comments can be put into any place of a script. They don't affect its execution because the engine simply ignores them. - -**One-line comments start with two forward slash characters `//`.** - -The rest of the line is a comment. It may occupy a full line of its own or follow a statement. - -Like here: -```js run -// This comment occupies a line of its own -alert('Hello'); - -alert('World'); // This comment follows the statement -``` - -**Multiline comments start with a forward slash and an asterisk /* and end with an asterisk and a forward slash */.** - -Like this: - -```js run -/* An example with two messages. -This is a multiline comment. -*/ -alert('Hello'); -alert('World'); -``` - -The content of comments is ignored, so if we put code inside /* ... */, it won't execute. - -Sometimes it can be handy to temporarily disable a part of code: - -```js run -/* Commenting out the code -alert('Hello'); -*/ -alert('World'); -``` - -```smart header="Use hotkeys!" -In most editors, a line of code can be commented out by pressing the `key:Ctrl+/` hotkey for a single-line comment and something like `key:Ctrl+Shift+/` -- for multiline comments (select a piece of code and press the hotkey). For Mac, try `key:Cmd` instead of `key:Ctrl` and `key:Option` instead of `key:Shift`. -``` - -````warn header="Nested comments are not supported!" -There may not be `/*...*/` inside another `/*...*/`. - -Such code will die with an error: - -```js run no-beautify -/* - /* nested comment ?!? */ -*/ -alert( 'World' ); -``` -```` - -Please, don't hesitate to comment your code. - -Comments increase the overall code footprint, but that's not a problem at all. There are many tools which minify code before publishing to a production server. They remove comments, so they don't appear in the working scripts. Therefore, comments do not have negative effects on production at all. - -Later in the tutorial there will be a chapter that also explains how to write better comments. diff --git a/1-js/02-first-steps/03-strict-mode/article.md b/1-js/02-first-steps/03-strict-mode/article.md deleted file mode 100644 index 9586733cc8..0000000000 --- a/1-js/02-first-steps/03-strict-mode/article.md +++ /dev/null @@ -1,89 +0,0 @@ -# The modern mode, "use strict" - -For a long time, JavaScript evolved without compatibility issues. New features were added to the language while old functionality didn't change. - -That had the benefit of never breaking existing code. But the downside was that any mistake or an imperfect decision made by JavaScript's creators got stuck in the language forever. - -This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the language and modified some of the existing ones. To keep the old code working, most such modifications are off by default. You need to explicitly enable them with a special directive: `"use strict"`. - -## "use strict" - -The directive looks like a string: `"use strict"` or `'use strict'`. When it is located at the top of a script, the whole script works the "modern" way. - -For example: - -```js -"use strict"; - -// this code works the modern way -... -``` - -Quite soon we're going to learn functions (a way to group commands), so let's note in advance that `"use strict"` can be put at the beginning of a function. Doing that enables strict mode in that function only. But usually people use it for the whole script. - -````warn header="Ensure that \"use strict\" is at the top" -Please make sure that `"use strict"` is at the top of your scripts, otherwise strict mode may not be enabled. - -Strict mode isn't enabled here: - -```js no-strict -alert("some code"); -// "use strict" below is ignored--it must be at the top - -"use strict"; - -// strict mode is not activated -``` - -Only comments may appear above `"use strict"`. -```` - -```warn header="There's no way to cancel `use strict`" -There is no directive like `"no use strict"` that reverts the engine to old behavior. - -Once we enter strict mode, there's no going back. -``` - -## Browser console - -When you use a [developer console](info:devtools) to run code, please note that it doesn't `use strict` by default. - -Sometimes, when `use strict` makes a difference, you'll get incorrect results. - -So, how to actually `use strict` in the console? - -First, you can try to press `key:Shift+Enter` to input multiple lines, and put `use strict` on top, like this: - -```js -'use strict'; -// ...your code - -``` - -It works in most browsers, namely Firefox and Chrome. - -If it doesn't, e.g. in an old browser, there's an ugly, but reliable way to ensure `use strict`. Put it inside this kind of wrapper: - -```js -(function() { - 'use strict'; - - // ...your code here... -})() -``` - -## Should we "use strict"? - -The question may sound obvious, but it's not so. - -One could recommend to start scripts with `"use strict"`... But you know what's cool? - -Modern JavaScript supports "classes" and "modules" - advanced language structures (we'll surely get to them), that enable `use strict` automatically. So we don't need to add the `"use strict"` directive, if we use them. - -**So, for now `"use strict";` is a welcome guest at the top of your scripts. Later, when your code is all in classes and modules, you may omit it.** - -As of now, we've got to know about `use strict` in general. - -In the next chapters, as we learn language features, we'll see the differences between the strict and old modes. Luckily, there aren't many and they actually make our lives better. - -All examples in this tutorial assume strict mode unless (very rarely) specified otherwise. diff --git a/1-js/02-first-steps/04-variables/article.md b/1-js/02-first-steps/04-variables/article.md deleted file mode 100644 index e91d0ea7ea..0000000000 --- a/1-js/02-first-steps/04-variables/article.md +++ /dev/null @@ -1,345 +0,0 @@ -# Variables - -Most of the time, a JavaScript application needs to work with information. Here are two examples: -1. An online shop -- the information might include goods being sold and a shopping cart. -2. A chat application -- the information might include users, messages, and much more. - -Variables are used to store this information. - -## A variable - -A [variable](https://en.wikipedia.org/wiki/Variable_(computer_science)) is a "named storage" for data. We can use variables to store goodies, visitors, and other data. - -To create a variable in JavaScript, use the `let` keyword. - -The statement below creates (in other words: *declares*) a variable with the name "message": - -```js -let message; -``` - -Now, we can put some data into it by using the assignment operator `=`: - -```js -let message; - -*!* -message = 'Hello'; // store the string 'Hello' in the variable named message -*/!* -``` - -The string is now saved into the memory area associated with the variable. We can access it using the variable name: - -```js run -let message; -message = 'Hello!'; - -*!* -alert(message); // shows the variable content -*/!* -``` - -To be concise, we can combine the variable declaration and assignment into a single line: - -```js run -let message = 'Hello!'; // define the variable and assign the value - -alert(message); // Hello! -``` - -We can also declare multiple variables in one line: - -```js no-beautify -let user = 'John', age = 25, message = 'Hello'; -``` - -That might seem shorter, but we don't recommend it. For the sake of better readability, please use a single line per variable. - -The multiline variant is a bit longer, but easier to read: - -```js -let user = 'John'; -let age = 25; -let message = 'Hello'; -``` - -Some people also define multiple variables in this multiline style: - -```js no-beautify -let user = 'John', - age = 25, - message = 'Hello'; -``` - -...Or even in the "comma-first" style: - -```js no-beautify -let user = 'John' - , age = 25 - , message = 'Hello'; -``` - -Technically, all these variants do the same thing. So, it's a matter of personal taste and aesthetics. - -````smart header="`var` instead of `let`" -In older scripts, you may also find another keyword: `var` instead of `let`: - -```js -*!*var*/!* message = 'Hello'; -``` - -The `var` keyword is *almost* the same as `let`. It also declares a variable but in a slightly different, "old-school" way. - -There are subtle differences between `let` and `var`, but they do not matter to us yet. We'll cover them in detail in the chapter . -```` - -## A real-life analogy - -We can easily grasp the concept of a "variable" if we imagine it as a "box" for data, with a uniquely-named sticker on it. - -For instance, the variable `message` can be imagined as a box labelled `"message"` with the value `"Hello!"` in it: - -![](variable.svg) - -We can put any value in the box. - -We can also change it as many times as we want: - -```js run -let message; - -message = 'Hello!'; - -message = 'World!'; // value changed - -alert(message); -``` - -When the value is changed, the old data is removed from the variable: - -![](variable-change.svg) - -We can also declare two variables and copy data from one into the other. - -```js run -let hello = 'Hello world!'; - -let message; - -*!* -// copy 'Hello world' from hello into message -message = hello; -*/!* - -// now two variables hold the same data -alert(hello); // Hello world! -alert(message); // Hello world! -``` - -````warn header="Declaring twice triggers an error" -A variable should be declared only once. - -A repeated declaration of the same variable is an error: - -```js run -let message = "This"; - -// repeated 'let' leads to an error -let message = "That"; // SyntaxError: 'message' has already been declared -``` -So, we should declare a variable once and then refer to it without `let`. -```` - -```smart header="Functional languages" -It's interesting to note that there exist so-called [pure functional](https://en.wikipedia.org/wiki/Purely_functional_programming) programming languages, such as [Haskell](https://en.wikipedia.org/wiki/Haskell), that forbid changing variable values. - -In such languages, once the value is stored "in the box", it's there forever. If we need to store something else, the language forces us to create a new box (declare a new variable). We can't reuse the old one. - -Though it may seem a little odd at first sight, these languages are quite capable of serious development. More than that, there are areas like parallel computations where this limitation confers certain benefits. -``` - -## Variable naming [#variable-naming] - -There are two limitations on variable names in JavaScript: - -1. The name must contain only letters, digits, or the symbols `$` and `_`. -2. The first character must not be a digit. - -Examples of valid names: - -```js -let userName; -let test123; -``` - -When the name contains multiple words, [camelCase](https://en.wikipedia.org/wiki/CamelCase) is commonly used. That is: words go one after another, each word except first starting with a capital letter: `myVeryLongName`. - -What's interesting -- the dollar sign `'$'` and the underscore `'_'` can also be used in names. They are regular symbols, just like letters, without any special meaning. - -These names are valid: - -```js run untrusted -let $ = 1; // declared a variable with the name "$" -let _ = 2; // and now a variable with the name "_" - -alert($ + _); // 3 -``` - -Examples of incorrect variable names: - -```js no-beautify -let 1a; // cannot start with a digit - -let my-name; // hyphens '-' aren't allowed in the name -``` - -```smart header="Case matters" -Variables named `apple` and `APPLE` are two different variables. -``` - -````smart header="Non-Latin letters are allowed, but not recommended" -It is possible to use any language, including Cyrillic letters, Chinese logograms and so on, like this: - -```js -let имя = '...'; -let 我 = '...'; -``` - -Technically, there is no error here. Such names are allowed, but there is an international convention to use English in variable names. Even if we're writing a small script, it may have a long life ahead. People from other countries may need to read it sometime. -```` - -````warn header="Reserved names" -There is a [list of reserved words](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords), which cannot be used as variable names because they are used by the language itself. - -For example: `let`, `class`, `return`, and `function` are reserved. - -The code below gives a syntax error: - -```js run no-beautify -let let = 5; // can't name a variable "let", error! -let return = 5; // also can't name it "return", error! -``` -```` - -````warn header="An assignment without `use strict`" - -Normally, we need to define a variable before using it. But in the old times, it was technically possible to create a variable by a mere assignment of the value without using `let`. This still works now if we don't put `use strict` in our scripts to maintain compatibility with old scripts. - -```js run no-strict -// note: no "use strict" in this example - -num = 5; // the variable "num" is created if it didn't exist - -alert(num); // 5 -``` - -This is a bad practice and would cause an error in strict mode: - -```js -"use strict"; - -*!* -num = 5; // error: num is not defined -*/!* -``` -```` - -## Constants - -To declare a constant (unchanging) variable, use `const` instead of `let`: - -```js -const myBirthday = '18.04.1982'; -``` - -Variables declared using `const` are called "constants". They cannot be reassigned. An attempt to do so would cause an error: - -```js run -const myBirthday = '18.04.1982'; - -myBirthday = '01.01.2001'; // error, can't reassign the constant! -``` - -When a programmer is sure that a variable will never change, they can declare it with `const` to guarantee and communicate that fact to everyone. - -### Uppercase constants - -There is a widespread practice to use constants as aliases for difficult-to-remember values that are known before execution. - -Such constants are named using capital letters and underscores. - -For instance, let's make constants for colors in so-called "web" (hexadecimal) format: - -```js run -const COLOR_RED = "#F00"; -const COLOR_GREEN = "#0F0"; -const COLOR_BLUE = "#00F"; -const COLOR_ORANGE = "#FF7F00"; - -// ...when we need to pick a color -let color = COLOR_ORANGE; -alert(color); // #FF7F00 -``` - -Benefits: - -- `COLOR_ORANGE` is much easier to remember than `"#FF7F00"`. -- It is much easier to mistype `"#FF7F00"` than `COLOR_ORANGE`. -- When reading the code, `COLOR_ORANGE` is much more meaningful than `#FF7F00`. - -When should we use capitals for a constant and when should we name it normally? Let's make that clear. - -Being a "constant" just means that a variable's value never changes. But some constants are known before execution (like a hexadecimal value for red) and some constants are *calculated* in run-time, during the execution, but do not change after their initial assignment. - -For instance: - -```js -const pageLoadTime = /* time taken by a webpage to load */; -``` - -The value of `pageLoadTime` is not known before the page load, so it's named normally. But it's still a constant because it doesn't change after the assignment. - -In other words, capital-named constants are only used as aliases for "hard-coded" values. - -## Name things right - -Talking about variables, there's one more extremely important thing. - -A variable name should have a clean, obvious meaning, describing the data that it stores. - -Variable naming is one of the most important and complex skills in programming. A glance at variable names can reveal which code was written by a beginner versus an experienced developer. - -In a real project, most of the time is spent modifying and extending an existing code base rather than writing something completely separate from scratch. When we return to some code after doing something else for a while, it's much easier to find information that is well-labelled. Or, in other words, when the variables have good names. - -Please spend time thinking about the right name for a variable before declaring it. Doing so will repay you handsomely. - -Some good-to-follow rules are: - -- Use human-readable names like `userName` or `shoppingCart`. -- Stay away from abbreviations or short names like `a`, `b`, and `c`, unless you know what you're doing. -- Make names maximally descriptive and concise. Examples of bad names are `data` and `value`. Such names say nothing. It's only okay to use them if the context of the code makes it exceptionally obvious which data or value the variable is referencing. -- Agree on terms within your team and in your mind. If a site visitor is called a "user" then we should name related variables `currentUser` or `newUser` instead of `currentVisitor` or `newManInTown`. - -Sounds simple? Indeed it is, but creating descriptive and concise variable names in practice is not. Go for it. - -```smart header="Reuse or create?" -And the last note. There are some lazy programmers who, instead of declaring new variables, tend to reuse existing ones. - -As a result, their variables are like boxes into which people throw different things without changing their stickers. What's inside the box now? Who knows? We need to come closer and check. - -Such programmers save a little bit on variable declaration but lose ten times more on debugging. - -An extra variable is good, not evil. - -Modern JavaScript minifiers and browsers optimize code well enough, so it won't create performance issues. Using different variables for different values can even help the engine optimize your code. -``` - -## Summary - -We can declare variables to store data by using the `var`, `let`, or `const` keywords. - -- `let` -- is a modern variable declaration. -- `var` -- is an old-school variable declaration. Normally we don't use it at all, but we'll cover subtle differences from `let` in the chapter , just in case you need them. -- `const` -- is like `let`, but the value of the variable can't be changed. - -Variables should be named in a way that allows us to easily understand what's inside them. diff --git a/1-js/02-first-steps/04-variables/variable-change.svg b/1-js/02-first-steps/04-variables/variable-change.svg deleted file mode 100644 index 1b26792380..0000000000 --- a/1-js/02-first-steps/04-variables/variable-change.svg +++ /dev/null @@ -1 +0,0 @@ -"World!""Hello!"message \ No newline at end of file diff --git a/1-js/02-first-steps/04-variables/variable.svg b/1-js/02-first-steps/04-variables/variable.svg deleted file mode 100644 index 1c3d8b0cbe..0000000000 --- a/1-js/02-first-steps/04-variables/variable.svg +++ /dev/null @@ -1 +0,0 @@ -"Hello!"message \ No newline at end of file diff --git a/1-js/02-first-steps/06-alert-prompt-confirm/1-simple-page/solution.md b/1-js/02-first-steps/06-alert-prompt-confirm/1-simple-page/solution.md deleted file mode 100644 index 903ee7ff35..0000000000 --- a/1-js/02-first-steps/06-alert-prompt-confirm/1-simple-page/solution.md +++ /dev/null @@ -1,24 +0,0 @@ -JavaScript-code: - -```js demo run -let name = prompt("What is your name?", ""); -alert(name); -``` - -The full page: - -```html - - - - - - - - -``` diff --git a/1-js/02-first-steps/06-alert-prompt-confirm/1-simple-page/task.md b/1-js/02-first-steps/06-alert-prompt-confirm/1-simple-page/task.md deleted file mode 100644 index a65a654e05..0000000000 --- a/1-js/02-first-steps/06-alert-prompt-confirm/1-simple-page/task.md +++ /dev/null @@ -1,9 +0,0 @@ -importance: 4 - ---- - -# A simple page - -Create a web-page that asks for a name and outputs it. - -[demo] diff --git a/1-js/02-first-steps/06-alert-prompt-confirm/article.md b/1-js/02-first-steps/06-alert-prompt-confirm/article.md deleted file mode 100644 index ef0f333cb5..0000000000 --- a/1-js/02-first-steps/06-alert-prompt-confirm/article.md +++ /dev/null @@ -1,105 +0,0 @@ -# Interaction: alert, prompt, confirm - -As we'll be using the browser as our demo environment, let's see a couple of functions to interact with the user: `alert`, `prompt` and `confirm`. - -## alert - -This one we've seen already. It shows a message and waits for the user to press "OK". - -For example: - -```js run -alert("Hello"); -``` - -The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons, etc, until they have dealt with the window. In this case -- until they press "OK". - -## prompt - -The function `prompt` accepts two arguments: - -```js no-beautify -result = prompt(title, [default]); -``` - -It shows a modal window with a text message, an input field for the visitor, and the buttons OK/Cancel. - -`title` -: The text to show the visitor. - -`default` -: An optional second parameter, the initial value for the input field. - -```smart header="The square brackets in syntax `[...]`" -The square brackets around `default` in the syntax above denote that the parameter is optional, not required. -``` - -The visitor can type something in the prompt input field and press OK. Then we get that text in the `result`. Or they can cancel the input by pressing Cancel or hitting the `key:Esc` key, then we get `null` as the `result`. - -The call to `prompt` returns the text from the input field or `null` if the input was canceled. - -For instance: - -```js run -let age = prompt('How old are you?', 100); - -alert(`You are ${age} years old!`); // You are 100 years old! -``` - -````warn header="In IE: always supply a `default`" -The second parameter is optional, but if we don't supply it, Internet Explorer will insert the text `"undefined"` into the prompt. - -Run this code in Internet Explorer to see: - -```js run -let test = prompt("Test"); -``` - -So, for prompts to look good in IE, we recommend always providing the second argument: - -```js run -let test = prompt("Test", ''); // <-- for IE -``` -```` - -## confirm - -The syntax: - -```js -result = confirm(question); -``` - -The function `confirm` shows a modal window with a `question` and two buttons: OK and Cancel. - -The result is `true` if OK is pressed and `false` otherwise. - -For example: - -```js run -let isBoss = confirm("Are you the boss?"); - -alert( isBoss ); // true if OK is pressed -``` - -## Summary - -We covered 3 browser-specific functions to interact with visitors: - -`alert` -: shows a message. - -`prompt` -: shows a message asking the user to input text. It returns the text or, if Cancel button or `key:Esc` is clicked, `null`. - -`confirm` -: shows a message and waits for the user to press "OK" or "Cancel". It returns `true` for OK and `false` for Cancel/`key:Esc`. - -All these methods are modal: they pause script execution and don't allow the visitor to interact with the rest of the page until the window has been dismissed. - -There are two limitations shared by all the methods above: - -1. The exact location of the modal window is determined by the browser. Usually, it's in the center. -2. The exact look of the window also depends on the browser. We can't modify it. - -That is the price for simplicity. There are other ways to show nicer windows and richer interaction with the visitor, but if "bells and whistles" do not matter much, these methods work just fine. diff --git a/1-js/02-first-steps/10-ifelse/2-check-standard/ifelse_task2.svg b/1-js/02-first-steps/10-ifelse/2-check-standard/ifelse_task2.svg index 47b020aab1..c05c54bd1b 100644 --- a/1-js/02-first-steps/10-ifelse/2-check-standard/ifelse_task2.svg +++ b/1-js/02-first-steps/10-ifelse/2-check-standard/ifelse_task2.svg @@ -1 +1 @@ -BeginYou don't know? “ECMAScript”!Right!What's the “official” name of JavaScript?OtherECMAScript \ No newline at end of file +BeginYou don't know? “ECMAScript”!Right!What's the “official” name of JavaScript?OtherECMAScript \ No newline at end of file diff --git a/1-js/02-first-steps/11-logical-operators/9-check-login/ifelse_task.svg b/1-js/02-first-steps/11-logical-operators/9-check-login/ifelse_task.svg index d22b518a91..f3a9164256 100644 --- a/1-js/02-first-steps/11-logical-operators/9-check-login/ifelse_task.svg +++ b/1-js/02-first-steps/11-logical-operators/9-check-login/ifelse_task.svg @@ -1 +1 @@ -BeginCanceledCanceledWelcome!I don't know youWrong passwordWho's there?Password?CancelCancelAdminTheMasterOtherOther \ No newline at end of file +BeginCanceledCanceledWelcome!I don't know youWrong passwordWho's there?Password?CancelCancelAdminTheMasterOtherOther \ No newline at end of file diff --git a/1-js/03-code-quality/01-debugging-chrome/chrome-open-sources.svg b/1-js/03-code-quality/01-debugging-chrome/chrome-open-sources.svg index 5fc6dce3aa..a0f888084d 100644 --- a/1-js/03-code-quality/01-debugging-chrome/chrome-open-sources.svg +++ b/1-js/03-code-quality/01-debugging-chrome/chrome-open-sources.svg @@ -1 +1 @@ -open sources \ No newline at end of file +open sources \ No newline at end of file diff --git a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-breakpoint.svg b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-breakpoint.svg index 63bf4966e2..8cc16d7356 100644 --- a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-breakpoint.svg +++ b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-breakpoint.svg @@ -1 +1 @@ -here's the listbreakpoints \ No newline at end of file +here's the listbreakpoints \ No newline at end of file diff --git a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-console.svg b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-console.svg index 3fe5f124f2..fcde456aef 100644 --- a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-console.svg +++ b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-console.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-pause.svg b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-pause.svg index 0147c2e0aa..e1ca4835c3 100644 --- a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-pause.svg +++ b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-pause.svg @@ -1 +1 @@ -213see the outer call detailswatch expressionscurrent variables \ No newline at end of file +213see the outer call detailswatch expressionscurrent variables \ No newline at end of file diff --git a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-trace-1.svg b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-trace-1.svg index 9fa1b3b8cc..da283160e4 100644 --- a/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-trace-1.svg +++ b/1-js/03-code-quality/01-debugging-chrome/chrome-sources-debugger-trace-1.svg @@ -1 +1 @@ -nested calls \ No newline at end of file +nested calls \ No newline at end of file diff --git a/1-js/03-code-quality/01-debugging-chrome/chrome-tabs.svg b/1-js/03-code-quality/01-debugging-chrome/chrome-tabs.svg index 0167082569..4d48043c19 100644 --- a/1-js/03-code-quality/01-debugging-chrome/chrome-tabs.svg +++ b/1-js/03-code-quality/01-debugging-chrome/chrome-tabs.svg @@ -1 +1 @@ -213 \ No newline at end of file +213 \ No newline at end of file diff --git a/1-js/03-code-quality/02-coding-style/code-style.svg b/1-js/03-code-quality/02-coding-style/code-style.svg index 739d9f1edf..6bf3912958 100644 --- a/1-js/03-code-quality/02-coding-style/code-style.svg +++ b/1-js/03-code-quality/02-coding-style/code-style.svg @@ -1 +1 @@ -2No space between the function name and parentheses between the parentheses and the parameterIndentation 2 spacesA space after for/if/while…} else { without a line breakSpaces around a nested callAn empty line between logical blocksLines are not very longA semicolon ; is mandatorySpaces around operatorsCurly brace { on the same line, after a spaceA space between argumentsA space between parameters \ No newline at end of file +2No space between the function name and parentheses between the parentheses and the parameterIndentation 2 spacesA space after for/if/while…} else { without a line breakSpaces around a nested callAn empty line between logical blocksLines are not very longA semicolon ; is mandatorySpaces around operatorsCurly brace { on the same line, after a spaceA space between argumentsA space between parameters \ No newline at end of file diff --git a/1-js/04-object-basics/01-object/object-user-delete.svg b/1-js/04-object-basics/01-object/object-user-delete.svg index c5af7e7afc..08640b5740 100644 --- a/1-js/04-object-basics/01-object/object-user-delete.svg +++ b/1-js/04-object-basics/01-object/object-user-delete.svg @@ -1 +1 @@ -nameisAdminuser \ No newline at end of file +nameisAdminuser \ No newline at end of file diff --git a/1-js/04-object-basics/01-object/object-user-empty.svg b/1-js/04-object-basics/01-object/object-user-empty.svg index 99edb0269a..b2ec71bce6 100644 --- a/1-js/04-object-basics/01-object/object-user-empty.svg +++ b/1-js/04-object-basics/01-object/object-user-empty.svg @@ -1 +1 @@ -emptyuser \ No newline at end of file +emptyuser \ No newline at end of file diff --git a/1-js/04-object-basics/01-object/object-user-isadmin.svg b/1-js/04-object-basics/01-object/object-user-isadmin.svg index e2cc0eaf15..9869155280 100644 --- a/1-js/04-object-basics/01-object/object-user-isadmin.svg +++ b/1-js/04-object-basics/01-object/object-user-isadmin.svg @@ -1 +1 @@ -nameageisAdminuser \ No newline at end of file +nameageisAdminuser \ No newline at end of file diff --git a/1-js/04-object-basics/01-object/object-user-props.svg b/1-js/04-object-basics/01-object/object-user-props.svg index b3d5c9b71b..c6d2b2afe5 100644 --- a/1-js/04-object-basics/01-object/object-user-props.svg +++ b/1-js/04-object-basics/01-object/object-user-props.svg @@ -1 +1 @@ -nameagelikes birdsuser \ No newline at end of file +nameagelikes birdsuser \ No newline at end of file diff --git a/1-js/04-object-basics/01-object/object-user.svg b/1-js/04-object-basics/01-object/object-user.svg index f499fbc10f..377b589d2e 100644 --- a/1-js/04-object-basics/01-object/object-user.svg +++ b/1-js/04-object-basics/01-object/object-user.svg @@ -1 +1 @@ -nameageuser \ No newline at end of file +nameageuser \ No newline at end of file diff --git a/1-js/04-object-basics/01-object/object.svg b/1-js/04-object-basics/01-object/object.svg index 47431a6e1f..9d8ece8d96 100644 --- a/1-js/04-object-basics/01-object/object.svg +++ b/1-js/04-object-basics/01-object/object.svg @@ -1 +1 @@ -key1key2key3 \ No newline at end of file +key1key2key3 \ No newline at end of file diff --git a/1-js/04-object-basics/02-object-copy/variable-contains-reference.svg b/1-js/04-object-basics/02-object-copy/variable-contains-reference.svg index 267f045785..a8adcdb5d4 100644 --- a/1-js/04-object-basics/02-object-copy/variable-contains-reference.svg +++ b/1-js/04-object-basics/02-object-copy/variable-contains-reference.svg @@ -1 +1 @@ -username \ No newline at end of file +username \ No newline at end of file diff --git a/1-js/04-object-basics/02-object-copy/variable-copy-reference.svg b/1-js/04-object-basics/02-object-copy/variable-copy-reference.svg index a847fb200e..9b5b1371f5 100644 --- a/1-js/04-object-basics/02-object-copy/variable-copy-reference.svg +++ b/1-js/04-object-basics/02-object-copy/variable-copy-reference.svg @@ -1 +1 @@ -useradminname \ No newline at end of file +useradminname \ No newline at end of file diff --git a/1-js/04-object-basics/02-object-copy/variable-copy-value.svg b/1-js/04-object-basics/02-object-copy/variable-copy-value.svg index 0d6ca67bc6..fb443141bd 100644 --- a/1-js/04-object-basics/02-object-copy/variable-copy-value.svg +++ b/1-js/04-object-basics/02-object-copy/variable-copy-value.svg @@ -1 +1 @@ -"Hello!"message"Hello!"phrase \ No newline at end of file +"Hello!"message"Hello!"phrase \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/family-delete-refs.svg b/1-js/04-object-basics/03-garbage-collection/family-delete-refs.svg index a582ca64b7..d19f4f68e2 100644 --- a/1-js/04-object-basics/03-garbage-collection/family-delete-refs.svg +++ b/1-js/04-object-basics/03-garbage-collection/family-delete-refs.svg @@ -1 +1 @@ -<global variable>ObjectObjectwifefamilyname: "John"name: "Ann"motherObjectfatherhusband \ No newline at end of file +<global variable>ObjectObjectwifefamilyname: "John"name: "Ann"motherObjectfatherhusband \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/family-no-family.svg b/1-js/04-object-basics/03-garbage-collection/family-no-family.svg index c73dd6a48f..dc0940f434 100644 --- a/1-js/04-object-basics/03-garbage-collection/family-no-family.svg +++ b/1-js/04-object-basics/03-garbage-collection/family-no-family.svg @@ -1 +1 @@ -<global>ObjectObjectfatherwifename: "John"name: "Ann"motherObjecthusbandfamily: null \ No newline at end of file +<global>ObjectObjectfatherwifename: "John"name: "Ann"motherObjecthusbandfamily: null \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/family-no-father-2.svg b/1-js/04-object-basics/03-garbage-collection/family-no-father-2.svg index 6bd13c0e80..ca06b41dfb 100644 --- a/1-js/04-object-basics/03-garbage-collection/family-no-father-2.svg +++ b/1-js/04-object-basics/03-garbage-collection/family-no-father-2.svg @@ -1 +1 @@ -Objectfamilyname: "Ann"motherObject<global> \ No newline at end of file +Objectfamilyname: "Ann"motherObject<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/family-no-father.svg b/1-js/04-object-basics/03-garbage-collection/family-no-father.svg index fd1f206073..364ba0fc7c 100644 --- a/1-js/04-object-basics/03-garbage-collection/family-no-father.svg +++ b/1-js/04-object-basics/03-garbage-collection/family-no-father.svg @@ -1 +1 @@ -ObjectObjectwifefamilyname: "John"name: "Ann"motherObject<global> \ No newline at end of file +ObjectObjectwifefamilyname: "John"name: "Ann"motherObject<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/family.svg b/1-js/04-object-basics/03-garbage-collection/family.svg index fd05348740..4aaad22459 100644 --- a/1-js/04-object-basics/03-garbage-collection/family.svg +++ b/1-js/04-object-basics/03-garbage-collection/family.svg @@ -1 +1 @@ -ObjectObjectfatherwifefamilyname: "John"name: "Ann"motherObjecthusband<global variable> \ No newline at end of file +ObjectObjectfatherwifefamilyname: "John"name: "Ann"motherObjecthusband<global variable> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/garbage-collection-1.svg b/1-js/04-object-basics/03-garbage-collection/garbage-collection-1.svg index 5cac52e9a9..d49661b08e 100644 --- a/1-js/04-object-basics/03-garbage-collection/garbage-collection-1.svg +++ b/1-js/04-object-basics/03-garbage-collection/garbage-collection-1.svg @@ -1 +1 @@ -<global> \ No newline at end of file +<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/garbage-collection-2.svg b/1-js/04-object-basics/03-garbage-collection/garbage-collection-2.svg index 7dd3a693a8..57458d7e0e 100644 --- a/1-js/04-object-basics/03-garbage-collection/garbage-collection-2.svg +++ b/1-js/04-object-basics/03-garbage-collection/garbage-collection-2.svg @@ -1 +1 @@ -<global> \ No newline at end of file +<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/garbage-collection-3.svg b/1-js/04-object-basics/03-garbage-collection/garbage-collection-3.svg index 1060577874..cefd58b02b 100644 --- a/1-js/04-object-basics/03-garbage-collection/garbage-collection-3.svg +++ b/1-js/04-object-basics/03-garbage-collection/garbage-collection-3.svg @@ -1 +1 @@ -<global> \ No newline at end of file +<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/garbage-collection-4.svg b/1-js/04-object-basics/03-garbage-collection/garbage-collection-4.svg index bd485adeeb..3a9371d9aa 100644 --- a/1-js/04-object-basics/03-garbage-collection/garbage-collection-4.svg +++ b/1-js/04-object-basics/03-garbage-collection/garbage-collection-4.svg @@ -1 +1 @@ -<global> \ No newline at end of file +<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/garbage-collection-5.svg b/1-js/04-object-basics/03-garbage-collection/garbage-collection-5.svg index 2d85432bc5..7ab63516ad 100644 --- a/1-js/04-object-basics/03-garbage-collection/garbage-collection-5.svg +++ b/1-js/04-object-basics/03-garbage-collection/garbage-collection-5.svg @@ -1 +1 @@ -<global>unreachables \ No newline at end of file +<global>unreachables \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/memory-user-john-admin.svg b/1-js/04-object-basics/03-garbage-collection/memory-user-john-admin.svg index 1913243548..a0ada56e2b 100644 --- a/1-js/04-object-basics/03-garbage-collection/memory-user-john-admin.svg +++ b/1-js/04-object-basics/03-garbage-collection/memory-user-john-admin.svg @@ -1 +1 @@ -username: "John"Objectadmin<global> \ No newline at end of file +username: "John"Objectadmin<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/memory-user-john-lost.svg b/1-js/04-object-basics/03-garbage-collection/memory-user-john-lost.svg index 07914a9ca0..88aa33d8bd 100644 --- a/1-js/04-object-basics/03-garbage-collection/memory-user-john-lost.svg +++ b/1-js/04-object-basics/03-garbage-collection/memory-user-john-lost.svg @@ -1 +1 @@ -name: "John"Objectuser: null<global> \ No newline at end of file +name: "John"Objectuser: null<global> \ No newline at end of file diff --git a/1-js/04-object-basics/03-garbage-collection/memory-user-john.svg b/1-js/04-object-basics/03-garbage-collection/memory-user-john.svg index 15bd51afb1..c57d304ce6 100644 --- a/1-js/04-object-basics/03-garbage-collection/memory-user-john.svg +++ b/1-js/04-object-basics/03-garbage-collection/memory-user-john.svg @@ -1 +1 @@ -username: "John"Object<global> \ No newline at end of file +username: "John"Object<global> \ No newline at end of file diff --git a/1-js/05-data-types/04-array/array-pop.svg b/1-js/05-data-types/04-array/array-pop.svg index 82b112b4a8..8e3966bdbb 100644 --- a/1-js/05-data-types/04-array/array-pop.svg +++ b/1-js/05-data-types/04-array/array-pop.svg @@ -1 +1 @@ -0123"Apple""Orange""Pear""Lemon"length = 4clear012"Apple""Orange""Pear"length = 3 \ No newline at end of file +0123"Apple""Orange""Pear""Lemon"length = 4clear012"Apple""Orange""Pear"length = 3 \ No newline at end of file diff --git a/1-js/05-data-types/04-array/array-shift.svg b/1-js/05-data-types/04-array/array-shift.svg index 9485a3c969..4ee34abc1f 100644 --- a/1-js/05-data-types/04-array/array-shift.svg +++ b/1-js/05-data-types/04-array/array-shift.svg @@ -1 +1 @@ -123"Orange""Pear""Lemon"length = 423"Orange""Pear""Lemon"length = 3clearmove elements to the left0"Apple"012"Orange""Pear""Lemon"11 \ No newline at end of file +123"Orange""Pear""Lemon"length = 423"Orange""Pear""Lemon"length = 3clearmove elements to the left0"Apple"012"Orange""Pear""Lemon"11 \ No newline at end of file diff --git a/1-js/05-data-types/04-array/array-speed.svg b/1-js/05-data-types/04-array/array-speed.svg index 41f7d998b4..f61fc75d33 100644 --- a/1-js/05-data-types/04-array/array-speed.svg +++ b/1-js/05-data-types/04-array/array-speed.svg @@ -1 +1 @@ -0123popunshiftpushshift \ No newline at end of file +0123popunshiftpushshift \ No newline at end of file diff --git a/1-js/05-data-types/04-array/queue.svg b/1-js/05-data-types/04-array/queue.svg index e89a3dcd2d..3fb08f2f60 100644 --- a/1-js/05-data-types/04-array/queue.svg +++ b/1-js/05-data-types/04-array/queue.svg @@ -1 +1 @@ -pushshift \ No newline at end of file +pushshift \ No newline at end of file diff --git a/1-js/05-data-types/04-array/stack.svg b/1-js/05-data-types/04-array/stack.svg index ae0c474d0f..97502ac5a2 100644 --- a/1-js/05-data-types/04-array/stack.svg +++ b/1-js/05-data-types/04-array/stack.svg @@ -1 +1 @@ -pushpop \ No newline at end of file +pushpop \ No newline at end of file diff --git a/1-js/05-data-types/05-array-methods/reduce.svg b/1-js/05-data-types/05-array-methods/reduce.svg index 180941dc29..4e89e86813 100644 --- a/1-js/05-data-types/05-array-methods/reduce.svg +++ b/1-js/05-data-types/05-array-methods/reduce.svg @@ -1 +1 @@ -1sum 0 current 12sum 0+1 current 23sum 0+1+2 current 34sum 0+1+2+3 current 45sum 0+1+2+3+4 current 50+1+2+3+4+5 = 15 \ No newline at end of file +1sum 0 current 12sum 0+1 current 23sum 0+1+2 current 34sum 0+1+2+3 current 45sum 0+1+2+3+4 current 50+1+2+3+4+5 = 15 \ No newline at end of file diff --git a/1-js/05-data-types/10-destructuring-assignment/destructuring-complex.svg b/1-js/05-data-types/10-destructuring-assignment/destructuring-complex.svg index 8a1ff1a934..a406f9de96 100644 --- a/1-js/05-data-types/10-destructuring-assignment/destructuring-complex.svg +++ b/1-js/05-data-types/10-destructuring-assignment/destructuring-complex.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/1-js/05-data-types/12-json/json-meetup.svg b/1-js/05-data-types/12-json/json-meetup.svg index 3fa32a261c..5ba3bd6ed0 100644 --- a/1-js/05-data-types/12-json/json-meetup.svg +++ b/1-js/05-data-types/12-json/json-meetup.svg @@ -1 +1 @@ -number: 23title: "Conference"...placeoccupiedByparticipants \ No newline at end of file +number: 23title: "Conference"...placeoccupiedByparticipants \ No newline at end of file diff --git a/1-js/06-advanced-functions/01-recursion/03-fibonacci-numbers/fibonacci-recursion-tree.svg b/1-js/06-advanced-functions/01-recursion/03-fibonacci-numbers/fibonacci-recursion-tree.svg index 1313837f30..a89c568b2f 100644 --- a/1-js/06-advanced-functions/01-recursion/03-fibonacci-numbers/fibonacci-recursion-tree.svg +++ b/1-js/06-advanced-functions/01-recursion/03-fibonacci-numbers/fibonacci-recursion-tree.svg @@ -1 +1 @@ -fib ( 5 )fib(4)fib(3)fib(3)fib(2)fib(0)fib(1)fib(1)fib(2)fib(0)fib(1)fib(1)fib(2)fib(0)fib(1) \ No newline at end of file +fib ( 5 )fib(4)fib(3)fib(3)fib(2)fib(0)fib(1)fib(1)fib(2)fib(0)fib(1)fib(1)fib(2)fib(0)fib(1) \ No newline at end of file diff --git a/1-js/06-advanced-functions/01-recursion/linked-list-0.svg b/1-js/06-advanced-functions/01-recursion/linked-list-0.svg index 5d23c7a4c6..cdb154372f 100644 --- a/1-js/06-advanced-functions/01-recursion/linked-list-0.svg +++ b/1-js/06-advanced-functions/01-recursion/linked-list-0.svg @@ -1 +1 @@ -value1nextvalue"new item"nextvalue2nextvalue3nextvalue4nextnulllist \ No newline at end of file +value1nextvalue"new item"nextvalue2nextvalue3nextvalue4nextnulllist \ No newline at end of file diff --git a/1-js/06-advanced-functions/01-recursion/linked-list-remove-1.svg b/1-js/06-advanced-functions/01-recursion/linked-list-remove-1.svg index 2f37449c47..492bad8184 100644 --- a/1-js/06-advanced-functions/01-recursion/linked-list-remove-1.svg +++ b/1-js/06-advanced-functions/01-recursion/linked-list-remove-1.svg @@ -1 +1 @@ -value"new item"nextvalue1nextvalue2nextvalue3nextvalue4nextnulllist \ No newline at end of file +value"new item"nextvalue1nextvalue2nextvalue3nextvalue4nextnulllist \ No newline at end of file diff --git a/1-js/06-advanced-functions/01-recursion/linked-list-split.svg b/1-js/06-advanced-functions/01-recursion/linked-list-split.svg index 6c30721307..45caa8370e 100644 --- a/1-js/06-advanced-functions/01-recursion/linked-list-split.svg +++ b/1-js/06-advanced-functions/01-recursion/linked-list-split.svg @@ -1 +1 @@ -value1nextvalue2nextvalue3nextvalue4nextnullnullsecondListlist \ No newline at end of file +value1nextvalue2nextvalue3nextvalue4nextnullnullsecondListlist \ No newline at end of file diff --git a/1-js/06-advanced-functions/01-recursion/linked-list.svg b/1-js/06-advanced-functions/01-recursion/linked-list.svg index c02744f390..b0e0d31ce6 100644 --- a/1-js/06-advanced-functions/01-recursion/linked-list.svg +++ b/1-js/06-advanced-functions/01-recursion/linked-list.svg @@ -1 +1 @@ -value1nextvalue2nextvalue3nextvalue4nextnulllist \ No newline at end of file +value1nextvalue2nextvalue3nextvalue4nextnulllist \ No newline at end of file diff --git a/1-js/06-advanced-functions/01-recursion/recursion-pow.svg b/1-js/06-advanced-functions/01-recursion/recursion-pow.svg index 2b970a04a9..9c7e783c3b 100644 --- a/1-js/06-advanced-functions/01-recursion/recursion-pow.svg +++ b/1-js/06-advanced-functions/01-recursion/recursion-pow.svg @@ -1 +1 @@ -pow(x,n)xx * pow(x, n-1)n == 1 ?YesNorecursive call until n==1 \ No newline at end of file +pow(x,n)xx * pow(x, n-1)n == 1 ?YesNorecursive call until n==1 \ No newline at end of file diff --git a/1-js/06-advanced-functions/01-recursion/recursive-salaries.svg b/1-js/06-advanced-functions/01-recursion/recursive-salaries.svg index bd874c5ba6..c597529044 100644 --- a/1-js/06-advanced-functions/01-recursion/recursive-salaries.svg +++ b/1-js/06-advanced-functions/01-recursion/recursive-salaries.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-empty.svg b/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-empty.svg index f8c7bd6ac4..4c50051796 100644 --- a/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-empty.svg +++ b/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-empty.svg @@ -1 +1 @@ -outer<empty>makeArmy() LexicalEnvironmentwhile iteration LexicalEnvironment<empty><empty><empty>i: 10 \ No newline at end of file +outer<empty>makeArmy() LexicalEnvironmentwhile iteration LexicalEnvironment<empty><empty><empty>i: 10 \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-for-fixed.svg b/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-for-fixed.svg index 7611d0ef80..11403244d6 100644 --- a/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-for-fixed.svg +++ b/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-for-fixed.svg @@ -1 +1 @@ -outermakeArmy() LexicalEnvironmentfor iteration LexicalEnvironmenti: 0i: 1i: 2i: 10... \ No newline at end of file +outermakeArmy() LexicalEnvironmentfor iteration LexicalEnvironmenti: 0i: 1i: 2i: 10... \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-while-fixed.svg b/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-while-fixed.svg index d83ecbe76f..42ee1e3f14 100644 --- a/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-while-fixed.svg +++ b/1-js/06-advanced-functions/03-closure/10-make-army/lexenv-makearmy-while-fixed.svg @@ -1 +1 @@ -outerj: 0j: 1j: 2j: 10...makeArmy() LexicalEnvironmentwhile iteration LexicalEnvironment \ No newline at end of file +outerj: 0j: 1j: 2j: 10...makeArmy() LexicalEnvironmentwhile iteration LexicalEnvironment \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/2-closure-variable-access/lexenv-nested-work.svg b/1-js/06-advanced-functions/03-closure/2-closure-variable-access/lexenv-nested-work.svg index 8dfd8bd638..bdce855202 100644 --- a/1-js/06-advanced-functions/03-closure/2-closure-variable-access/lexenv-nested-work.svg +++ b/1-js/06-advanced-functions/03-closure/2-closure-variable-access/lexenv-nested-work.svg @@ -1 +1 @@ -makeWorker: function name: "John"<empty>outerouterouternullname: "Pete" \ No newline at end of file +makeWorker: function name: "John"<empty>outerouterouternullname: "Pete" \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/closure-function-declaration.svg b/1-js/06-advanced-functions/03-closure/closure-function-declaration.svg index 3ef7878756..3bd92bef01 100644 --- a/1-js/06-advanced-functions/03-closure/closure-function-declaration.svg +++ b/1-js/06-advanced-functions/03-closure/closure-function-declaration.svg @@ -1 +1 @@ -outernullexecution startphrase: <uninitialized> say: function... \ No newline at end of file +outernullexecution startphrase: <uninitialized> say: function... \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/closure-makecounter-environment.svg b/1-js/06-advanced-functions/03-closure/closure-makecounter-environment.svg index f78441712f..694def4437 100644 --- a/1-js/06-advanced-functions/03-closure/closure-makecounter-environment.svg +++ b/1-js/06-advanced-functions/03-closure/closure-makecounter-environment.svg @@ -1 +1 @@ -null[[Environment]]makeCounter: function counter: undefinedcount: 0outerouter \ No newline at end of file +null[[Environment]]makeCounter: function counter: undefinedcount: 0outerouter \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call-2.svg b/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call-2.svg index 3950a8faa1..680a3d5ecb 100644 --- a/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call-2.svg +++ b/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call-2.svg @@ -1 +1 @@ -count: 1<empty>nullouterouteroutermakeCounter: function counter: functionmodified here \ No newline at end of file +count: 1<empty>nullouterouteroutermakeCounter: function counter: functionmodified here \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call.svg b/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call.svg index 24315bf214..56a37d21d4 100644 --- a/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call.svg +++ b/1-js/06-advanced-functions/03-closure/closure-makecounter-nested-call.svg @@ -1 +1 @@ -count: 0<empty>nullouterouteroutermakeCounter: function counter: function \ No newline at end of file +count: 0<empty>nullouterouteroutermakeCounter: function counter: function \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/closure-makecounter.svg b/1-js/06-advanced-functions/03-closure/closure-makecounter.svg index 2ca06455a5..257dd33f32 100644 --- a/1-js/06-advanced-functions/03-closure/closure-makecounter.svg +++ b/1-js/06-advanced-functions/03-closure/closure-makecounter.svg @@ -1 +1 @@ -makeCounter: function counter: undefinedcount: 0nullglobal LexicalEnvironmentLexicalEnvironment of makeCounter() callouterouter \ No newline at end of file +makeCounter: function counter: undefinedcount: 0nullglobal LexicalEnvironmentLexicalEnvironment of makeCounter() callouterouter \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/closure-variable-phrase.svg b/1-js/06-advanced-functions/03-closure/closure-variable-phrase.svg index b9bb12fff1..209e9d28a4 100644 --- a/1-js/06-advanced-functions/03-closure/closure-variable-phrase.svg +++ b/1-js/06-advanced-functions/03-closure/closure-variable-phrase.svg @@ -1 +1 @@ -phrase: "Bye"phrase: "Hello"phrase: undefinedphrase: <uninitialized>outernullexecution start \ No newline at end of file +phrase: "Bye"phrase: "Hello"phrase: undefinedphrase: <uninitialized>outernullexecution start \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexenv-if.svg b/1-js/06-advanced-functions/03-closure/lexenv-if.svg index 3d4d6d7ccf..6c6af96c3b 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-if.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-if.svg @@ -1 +1 @@ -phrase: "Hello"outerouternulluser: "John" \ No newline at end of file +phrase: "Hello"outerouternulluser: "John" \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-1.svg b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-1.svg index f15e77a888..7e9217c439 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-1.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-1.svg @@ -1 +1 @@ -makeCounter: function[[Environment]]outernull \ No newline at end of file +makeCounter: function[[Environment]]outernull \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-2.svg b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-2.svg index f374885379..d9d713e2e8 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-2.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-2.svg @@ -1 +1 @@ -makeCounter: functioncounter: undefinedcount: 0outerouternullglobal LexicalEnvironmentLexicalEnvironment of makeCounter() call \ No newline at end of file +makeCounter: functioncounter: undefinedcount: 0outerouternullglobal LexicalEnvironmentLexicalEnvironment of makeCounter() call \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-3.svg b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-3.svg index 54f1d97ba5..2b46a55ea2 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-3.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-3.svg @@ -1 +1 @@ -makeCounter: functioncounter: undefinedcount: 0outerouternull[[Environment]] \ No newline at end of file +makeCounter: functioncounter: undefinedcount: 0outerouternull[[Environment]] \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg index fb60a785fa..1e0226a3b0 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-4.svg @@ -1 +1 @@ -makeCounter: functioncounter: functioncount: 0outerouternull[[Environment]] \ No newline at end of file +makeCounter: functioncounter: functioncount: 0outerouternull[[Environment]] \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-5.svg b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-5.svg index 79c440da7a..71296f667c 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-5.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-5.svg @@ -1 +1 @@ -makeCounter: functioncounter: functioncount: 0<empty>outerouterouternull[[Environment]] \ No newline at end of file +makeCounter: functioncounter: functioncount: 0<empty>outerouterouternull[[Environment]] \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-6.svg b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-6.svg index 06d5b5060f..a2f0b490dd 100644 --- a/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-6.svg +++ b/1-js/06-advanced-functions/03-closure/lexenv-nested-makecounter-6.svg @@ -1 +1 @@ -makeCounter: functioncounter: functioncount: 1outerouternull[[Environment]]modified here \ No newline at end of file +makeCounter: functioncounter: functioncount: 1outerouternull[[Environment]]modified here \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexical-environment-global-2.svg b/1-js/06-advanced-functions/03-closure/lexical-environment-global-2.svg index b6e576f0c4..097cf977d7 100644 --- a/1-js/06-advanced-functions/03-closure/lexical-environment-global-2.svg +++ b/1-js/06-advanced-functions/03-closure/lexical-environment-global-2.svg @@ -1 +1 @@ -phrase: "Bye"phrase: "Hello"phrase: undefined<empty>outernullexecution start \ No newline at end of file +phrase: "Bye"phrase: "Hello"phrase: undefined<empty>outernullexecution start \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexical-environment-global-3.svg b/1-js/06-advanced-functions/03-closure/lexical-environment-global-3.svg index 1942a7e377..cc11810cf0 100644 --- a/1-js/06-advanced-functions/03-closure/lexical-environment-global-3.svg +++ b/1-js/06-advanced-functions/03-closure/lexical-environment-global-3.svg @@ -1 +1 @@ -say: function phrase: "Hello"say: functionouternullexecution start \ No newline at end of file +say: function phrase: "Hello"say: functionouternullexecution start \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexical-environment-global.svg b/1-js/06-advanced-functions/03-closure/lexical-environment-global.svg index 7bddc22302..794ae14af2 100644 --- a/1-js/06-advanced-functions/03-closure/lexical-environment-global.svg +++ b/1-js/06-advanced-functions/03-closure/lexical-environment-global.svg @@ -1 +1 @@ -phrase: "Hello"outernullLexical Environment \ No newline at end of file +phrase: "Hello"outernullLexical Environment \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexical-environment-simple-lookup.svg b/1-js/06-advanced-functions/03-closure/lexical-environment-simple-lookup.svg index 79501a5b0c..711ac544db 100644 --- a/1-js/06-advanced-functions/03-closure/lexical-environment-simple-lookup.svg +++ b/1-js/06-advanced-functions/03-closure/lexical-environment-simple-lookup.svg @@ -1 +1 @@ -say: function phrase: "Hello"name: "John"outerouternull \ No newline at end of file +say: function phrase: "Hello"name: "John"outerouternull \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexical-environment-simple.svg b/1-js/06-advanced-functions/03-closure/lexical-environment-simple.svg index dea6ac4673..d9b7fd629f 100644 --- a/1-js/06-advanced-functions/03-closure/lexical-environment-simple.svg +++ b/1-js/06-advanced-functions/03-closure/lexical-environment-simple.svg @@ -1 +1 @@ -say: function phrase: "Hello"name: "John"outerouternullLexical Environment of the call \ No newline at end of file +say: function phrase: "Hello"name: "John"outerouternullLexical Environment of the call \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/lexical-search-order.svg b/1-js/06-advanced-functions/03-closure/lexical-search-order.svg index d9884ec4f1..bc50680a40 100644 --- a/1-js/06-advanced-functions/03-closure/lexical-search-order.svg +++ b/1-js/06-advanced-functions/03-closure/lexical-search-order.svg @@ -1 +1 @@ -123 \ No newline at end of file +123 \ No newline at end of file diff --git a/1-js/06-advanced-functions/03-closure/variable-scope-lookup.svg b/1-js/06-advanced-functions/03-closure/variable-scope-lookup.svg index f1f1d3b1df..41ed5366c2 100644 --- a/1-js/06-advanced-functions/03-closure/variable-scope-lookup.svg +++ b/1-js/06-advanced-functions/03-closure/variable-scope-lookup.svg @@ -1 +1 @@ -functionUser(name){this.sayHi=function(){alert(name);};}letuser=newUser("John");user.sayHi(); \ No newline at end of file +functionUser(name){this.sayHi=function(){alert(name);};}letuser=newUser("John");user.sayHi(); \ No newline at end of file diff --git a/1-js/06-advanced-functions/08-settimeout-setinterval/setinterval-interval.svg b/1-js/06-advanced-functions/08-settimeout-setinterval/setinterval-interval.svg index bce7d6a843..be77e89df0 100644 --- a/1-js/06-advanced-functions/08-settimeout-setinterval/setinterval-interval.svg +++ b/1-js/06-advanced-functions/08-settimeout-setinterval/setinterval-interval.svg @@ -1 +1 @@ -func(1)func(2)func(3)100200300 \ No newline at end of file +func(1)func(2)func(3)100200300 \ No newline at end of file diff --git a/1-js/06-advanced-functions/08-settimeout-setinterval/settimeout-interval.svg b/1-js/06-advanced-functions/08-settimeout-setinterval/settimeout-interval.svg index d6d233b2ba..8b5eaaf635 100644 --- a/1-js/06-advanced-functions/08-settimeout-setinterval/settimeout-interval.svg +++ b/1-js/06-advanced-functions/08-settimeout-setinterval/settimeout-interval.svg @@ -1 +1 @@ -func(1)func(2)func(3)100100 \ No newline at end of file +func(1)func(2)func(3)100100 \ No newline at end of file diff --git a/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/debounce.svg b/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/debounce.svg index e624ce0203..cfdb67b0de 100644 --- a/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/debounce.svg +++ b/1-js/06-advanced-functions/09-call-apply-decorators/03-debounce/debounce.svg @@ -1 +1 @@ -200ms1500ms1000ms0cf(a)f(b)f(c)500mstimecalls: after 1000ms \ No newline at end of file +200ms1500ms1000ms0cf(a)f(b)f(c)500mstimecalls: after 1000ms \ No newline at end of file diff --git a/1-js/06-advanced-functions/09-call-apply-decorators/decorator-makecaching-wrapper.svg b/1-js/06-advanced-functions/09-call-apply-decorators/decorator-makecaching-wrapper.svg index 9b63cb982b..f85d93ea7f 100644 --- a/1-js/06-advanced-functions/09-call-apply-decorators/decorator-makecaching-wrapper.svg +++ b/1-js/06-advanced-functions/09-call-apply-decorators/decorator-makecaching-wrapper.svg @@ -1 +1 @@ -wrapperaround the function \ No newline at end of file +wrapperaround the function \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/object-prototype-empty.svg b/1-js/08-prototypes/01-prototype-inheritance/object-prototype-empty.svg index eb79c19ffd..0b31aa7f10 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/object-prototype-empty.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/object-prototype-empty.svg @@ -1 +1 @@ -prototype objectobject[[Prototype]] \ No newline at end of file +prototype objectobject[[Prototype]] \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-chain.svg b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-chain.svg index 4bf580ae77..674a49b9bf 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-chain.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-chain.svg @@ -1 +1 @@ -eats: true walk: functionanimaljumps: truerabbit[[Prototype]]earLength: 10longEar[[Prototype]] \ No newline at end of file +eats: true walk: functionanimaljumps: truerabbit[[Prototype]]earLength: 10longEar[[Prototype]] \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-2.svg b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-2.svg index 838c78395b..e6fdf1dbb2 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-2.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-2.svg @@ -1 +1 @@ -eats: true walk: functionanimalwalk: functionrabbit[[Prototype]] \ No newline at end of file +eats: true walk: functionanimalwalk: functionrabbit[[Prototype]] \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-3.svg b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-3.svg index d791e5390d..f3eeb84408 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-3.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk-3.svg @@ -1 +1 @@ -walk: function sleep: functionanimalrabbit[[Prototype]]name: "White Rabbit" isSleeping: true \ No newline at end of file +walk: function sleep: functionanimalrabbit[[Prototype]]name: "White Rabbit" isSleeping: true \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk.svg b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk.svg index b324710286..ec42b8fcb3 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit-walk.svg @@ -1 +1 @@ -eats: true walk: functionanimaljumps: truerabbit[[Prototype]] \ No newline at end of file +eats: true walk: functionanimaljumps: truerabbit[[Prototype]] \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit.svg b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit.svg index 4f3c1bc0ec..0fe639fc9a 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/proto-animal-rabbit.svg @@ -1 +1 @@ -eats: trueanimaljumps: truerabbit[[Prototype]] \ No newline at end of file +eats: trueanimaljumps: truerabbit[[Prototype]] \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/proto-user-admin.svg b/1-js/08-prototypes/01-prototype-inheritance/proto-user-admin.svg index bf0baf013a..d04f71c143 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/proto-user-admin.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/proto-user-admin.svg @@ -1 +1 @@ -name: "John" surname: "Smith" set fullName: functionisAdmin: true name: "Alice" surname: "Cooper"useradmin[[Prototype]] \ No newline at end of file +name: "John" surname: "Smith" set fullName: functionisAdmin: true name: "Alice" surname: "Cooper"useradmin[[Prototype]] \ No newline at end of file diff --git a/1-js/08-prototypes/01-prototype-inheritance/rabbit-animal-object.svg b/1-js/08-prototypes/01-prototype-inheritance/rabbit-animal-object.svg index 32a9858f83..15d57b5ab4 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/rabbit-animal-object.svg +++ b/1-js/08-prototypes/01-prototype-inheritance/rabbit-animal-object.svg @@ -1 +1 @@ -toString: function hasOwnProperty: function ...Object.prototypeanimal[[Prototype]][[Prototype]][[Prototype]]nulleats: truerabbitjumps: true \ No newline at end of file +toString: function hasOwnProperty: function ...Object.prototypeanimal[[Prototype]][[Prototype]][[Prototype]]nulleats: truerabbitjumps: true \ No newline at end of file diff --git a/1-js/08-prototypes/02-function-prototype/function-prototype-constructor.svg b/1-js/08-prototypes/02-function-prototype/function-prototype-constructor.svg index 59d60b397a..21cff89bb3 100644 --- a/1-js/08-prototypes/02-function-prototype/function-prototype-constructor.svg +++ b/1-js/08-prototypes/02-function-prototype/function-prototype-constructor.svg @@ -1 +1 @@ -Rabbitprototypeconstructordefault "prototype" \ No newline at end of file +Rabbitprototypeconstructordefault "prototype" \ No newline at end of file diff --git a/1-js/08-prototypes/02-function-prototype/proto-constructor-animal-rabbit.svg b/1-js/08-prototypes/02-function-prototype/proto-constructor-animal-rabbit.svg index ede4e1227e..54094bfc68 100644 --- a/1-js/08-prototypes/02-function-prototype/proto-constructor-animal-rabbit.svg +++ b/1-js/08-prototypes/02-function-prototype/proto-constructor-animal-rabbit.svg @@ -1 +1 @@ -eats: truename: "White Rabbit"animalRabbitrabbit[[Prototype]]prototype \ No newline at end of file +eats: truename: "White Rabbit"animalRabbitrabbit[[Prototype]]prototype \ No newline at end of file diff --git a/1-js/08-prototypes/02-function-prototype/rabbit-prototype-constructor.svg b/1-js/08-prototypes/02-function-prototype/rabbit-prototype-constructor.svg index 54b3d79804..95e989b85f 100644 --- a/1-js/08-prototypes/02-function-prototype/rabbit-prototype-constructor.svg +++ b/1-js/08-prototypes/02-function-prototype/rabbit-prototype-constructor.svg @@ -1 +1 @@ -default "prototype"Rabbitrabbit[[Prototype]]prototypeconstructor \ No newline at end of file +default "prototype"Rabbitrabbit[[Prototype]]prototypeconstructor \ No newline at end of file diff --git a/1-js/08-prototypes/03-native-prototypes/function-prototype-constructor.svg b/1-js/08-prototypes/03-native-prototypes/function-prototype-constructor.svg index 59d60b397a..21cff89bb3 100644 --- a/1-js/08-prototypes/03-native-prototypes/function-prototype-constructor.svg +++ b/1-js/08-prototypes/03-native-prototypes/function-prototype-constructor.svg @@ -1 +1 @@ -Rabbitprototypeconstructordefault "prototype" \ No newline at end of file +Rabbitprototypeconstructordefault "prototype" \ No newline at end of file diff --git a/1-js/08-prototypes/03-native-prototypes/native-prototypes-array-tostring.svg b/1-js/08-prototypes/03-native-prototypes/native-prototypes-array-tostring.svg index ebb4f32051..b9329235d5 100644 --- a/1-js/08-prototypes/03-native-prototypes/native-prototypes-array-tostring.svg +++ b/1-js/08-prototypes/03-native-prototypes/native-prototypes-array-tostring.svg @@ -1 +1 @@ -toString: function ...Array.prototypetoString: function ...Object.prototype[[Prototype]][[Prototype]][1, 2, 3] \ No newline at end of file +toString: function ...Array.prototypetoString: function ...Object.prototype[[Prototype]][[Prototype]][1, 2, 3] \ No newline at end of file diff --git a/1-js/08-prototypes/03-native-prototypes/native-prototypes-classes.svg b/1-js/08-prototypes/03-native-prototypes/native-prototypes-classes.svg index 4d6129e0a0..0dd41c0f2e 100644 --- a/1-js/08-prototypes/03-native-prototypes/native-prototypes-classes.svg +++ b/1-js/08-prototypes/03-native-prototypes/native-prototypes-classes.svg @@ -1 +1 @@ -toString: function other object methodsObject.prototypenullslice: function other array methods[[Prototype]][[Prototype]][[Prototype]][[Prototype]][[Prototype]][[Prototype]][[Prototype]]Array.prototypecall: function other function methodsFunction.prototypetoFixed: function other number methodsNumber.prototype[1, 2, 3]function f(args) { ... }5 \ No newline at end of file +toString: function other object methodsObject.prototypenullslice: function other array methods[[Prototype]][[Prototype]][[Prototype]][[Prototype]][[Prototype]][[Prototype]][[Prototype]]Array.prototypecall: function other function methodsFunction.prototypetoFixed: function other number methodsNumber.prototype[1, 2, 3]function f(args) { ... }5 \ No newline at end of file diff --git a/1-js/08-prototypes/03-native-prototypes/object-prototype-1.svg b/1-js/08-prototypes/03-native-prototypes/object-prototype-1.svg index 9630e68e27..b9c94d4c42 100644 --- a/1-js/08-prototypes/03-native-prototypes/object-prototype-1.svg +++ b/1-js/08-prototypes/03-native-prototypes/object-prototype-1.svg @@ -1 +1 @@ -constructor: Object toString: function ...Object.prototypeObjectobj = new Object()[[Prototype]]prototype \ No newline at end of file +constructor: Object toString: function ...Object.prototypeObjectobj = new Object()[[Prototype]]prototype \ No newline at end of file diff --git a/1-js/08-prototypes/03-native-prototypes/object-prototype-null.svg b/1-js/08-prototypes/03-native-prototypes/object-prototype-null.svg index 9ccb342299..953bd0b3da 100644 --- a/1-js/08-prototypes/03-native-prototypes/object-prototype-null.svg +++ b/1-js/08-prototypes/03-native-prototypes/object-prototype-null.svg @@ -1 +1 @@ -obj[[Prototype]]null \ No newline at end of file +obj[[Prototype]]null \ No newline at end of file diff --git a/1-js/08-prototypes/03-native-prototypes/object-prototype.svg b/1-js/08-prototypes/03-native-prototypes/object-prototype.svg index 024dd30213..7519c7bce1 100644 --- a/1-js/08-prototypes/03-native-prototypes/object-prototype.svg +++ b/1-js/08-prototypes/03-native-prototypes/object-prototype.svg @@ -1 +1 @@ -constructor: Object toString: function ...Object.prototypeObjectprototype \ No newline at end of file +constructor: Object toString: function ...Object.prototypeObjectprototype \ No newline at end of file diff --git a/1-js/08-prototypes/03-native-prototypes/rabbit-prototype-constructor.svg b/1-js/08-prototypes/03-native-prototypes/rabbit-prototype-constructor.svg index 54b3d79804..95e989b85f 100644 --- a/1-js/08-prototypes/03-native-prototypes/rabbit-prototype-constructor.svg +++ b/1-js/08-prototypes/03-native-prototypes/rabbit-prototype-constructor.svg @@ -1 +1 @@ -default "prototype"Rabbitrabbit[[Prototype]]prototypeconstructor \ No newline at end of file +default "prototype"Rabbitrabbit[[Prototype]]prototypeconstructor \ No newline at end of file diff --git a/1-js/08-prototypes/04-prototype-methods/object-prototype-2.svg b/1-js/08-prototypes/04-prototype-methods/object-prototype-2.svg index cf4d3023f8..6caf1d7868 100644 --- a/1-js/08-prototypes/04-prototype-methods/object-prototype-2.svg +++ b/1-js/08-prototypes/04-prototype-methods/object-prototype-2.svg @@ -1 +1 @@ -... get __proto__: function set __proto__: functionObject.prototypeObjectobj[[Prototype]]prototype \ No newline at end of file +... get __proto__: function set __proto__: functionObject.prototypeObjectobj[[Prototype]]prototype \ No newline at end of file diff --git a/1-js/08-prototypes/04-prototype-methods/object-prototype-null.svg b/1-js/08-prototypes/04-prototype-methods/object-prototype-null.svg index 9ccb342299..953bd0b3da 100644 --- a/1-js/08-prototypes/04-prototype-methods/object-prototype-null.svg +++ b/1-js/08-prototypes/04-prototype-methods/object-prototype-null.svg @@ -1 +1 @@ -obj[[Prototype]]null \ No newline at end of file +obj[[Prototype]]null \ No newline at end of file diff --git a/1-js/09-classes/01-class/class-user.svg b/1-js/09-classes/01-class/class-user.svg index 418d71d187..b1be806e72 100644 --- a/1-js/09-classes/01-class/class-user.svg +++ b/1-js/09-classes/01-class/class-user.svg @@ -1 +1 @@ -sayHi: functionUserUser.prototypeprototypeconstructor: User \ No newline at end of file +sayHi: functionUserUser.prototypeprototypeconstructor: User \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/animal-rabbit-extends.svg b/1-js/09-classes/02-class-inheritance/animal-rabbit-extends.svg index 63b5a18a19..95c74ad9a0 100644 --- a/1-js/09-classes/02-class-inheritance/animal-rabbit-extends.svg +++ b/1-js/09-classes/02-class-inheritance/animal-rabbit-extends.svg @@ -1 +1 @@ -constructor: Animal run: function stop: functionAnimal.prototypeconstructor: Rabbit hide: functionRabbit.prototypeAnimalRabbitnew Rabbit[[Prototype]][[Prototype]]prototypeprototypename: "White Rabbit"constructorconstructorextends \ No newline at end of file +constructor: Animal run: function stop: functionAnimal.prototypeconstructor: Rabbit hide: functionRabbit.prototypeAnimalRabbitnew Rabbit[[Prototype]][[Prototype]]prototypeprototypename: "White Rabbit"constructorconstructorextends \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/class-inheritance-array-object.svg b/1-js/09-classes/02-class-inheritance/class-inheritance-array-object.svg index 5ea9bf29ea..4361609e7c 100644 --- a/1-js/09-classes/02-class-inheritance/class-inheritance-array-object.svg +++ b/1-js/09-classes/02-class-inheritance/class-inheritance-array-object.svg @@ -1 +1 @@ -slice: function ...Array.prototypearrhasOwnProperty: function ...Object.prototype[1, 2, 3][[Prototype]][[Prototype]] \ No newline at end of file +slice: function ...Array.prototypearrhasOwnProperty: function ...Object.prototype[1, 2, 3][[Prototype]][[Prototype]] \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal-2.svg b/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal-2.svg index 72e47e34c2..fa2da07f0e 100644 --- a/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal-2.svg +++ b/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal-2.svg @@ -1 +1 @@ -jump: functionRabbit.prototyperabbiteat: functionAnimal.prototypename: "White Rabbit"[[Prototype]][[Prototype]]Rabbit.prototype.__proto__ = Animal.prototype sets thistoString: function hasOwnProperty: function ...Object.prototype[[Prototype]][[Prototype]]null \ No newline at end of file +jump: functionRabbit.prototyperabbiteat: functionAnimal.prototypename: "White Rabbit"[[Prototype]][[Prototype]]Rabbit.prototype.__proto__ = Animal.prototype sets thistoString: function hasOwnProperty: function ...Object.prototype[[Prototype]][[Prototype]]null \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal.svg b/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal.svg index bced3d355e..cd5c60ff01 100644 --- a/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal.svg +++ b/1-js/09-classes/02-class-inheritance/class-inheritance-rabbit-animal.svg @@ -1 +1 @@ -methods of RabbitRabbit.prototyperabbitmethods of AnimalAnimal.prototype[[Prototype]][[Prototype]]properties of rabbit \ No newline at end of file +methods of RabbitRabbit.prototyperabbitmethods of AnimalAnimal.prototype[[Prototype]][[Prototype]]properties of rabbit \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-animal.svg b/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-animal.svg index f53fc92dee..65fc202da8 100644 --- a/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-animal.svg +++ b/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-animal.svg @@ -1 +1 @@ - constructor: Animal run: function stop: functionAnimal.prototypeAnimalnew Animal[[Prototype]]prototypename: "My animal" \ No newline at end of file + constructor: Animal run: function stop: functionAnimal.prototypeAnimalnew Animal[[Prototype]]prototypename: "My animal" \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-rabbit.svg b/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-rabbit.svg index 2f30a3a901..6c13552a09 100644 --- a/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-rabbit.svg +++ b/1-js/09-classes/02-class-inheritance/rabbit-animal-independent-rabbit.svg @@ -1 +1 @@ - constructor: Rabbit hide: functionRabbit.prototypeRabbitnew Rabbit[[Prototype]]prototypename: "My rabbit" \ No newline at end of file + constructor: Rabbit hide: functionRabbit.prototypeRabbitnew Rabbit[[Prototype]]prototypename: "My rabbit" \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/super-homeobject-wrong.svg b/1-js/09-classes/02-class-inheritance/super-homeobject-wrong.svg index f6450ddc49..247e862327 100644 --- a/1-js/09-classes/02-class-inheritance/super-homeobject-wrong.svg +++ b/1-js/09-classes/02-class-inheritance/super-homeobject-wrong.svg @@ -1 +1 @@ -sayHiplantsayHitreesayHianimalrabbit[[HomeObject]]sayHi \ No newline at end of file +sayHiplantsayHitreesayHianimalrabbit[[HomeObject]]sayHi \ No newline at end of file diff --git a/1-js/09-classes/02-class-inheritance/this-super-loop.svg b/1-js/09-classes/02-class-inheritance/this-super-loop.svg index 4f5f45034a..41a778eda1 100644 --- a/1-js/09-classes/02-class-inheritance/this-super-loop.svg +++ b/1-js/09-classes/02-class-inheritance/this-super-loop.svg @@ -1 +1 @@ -rabbitlongEarrabbitlongEar \ No newline at end of file +rabbitlongEarrabbitlongEar \ No newline at end of file diff --git a/1-js/09-classes/03-static-properties-methods/3-class-extend-object/rabbit-extends-object.svg b/1-js/09-classes/03-static-properties-methods/3-class-extend-object/rabbit-extends-object.svg index 915ab9aa64..9b78052429 100644 --- a/1-js/09-classes/03-static-properties-methods/3-class-extend-object/rabbit-extends-object.svg +++ b/1-js/09-classes/03-static-properties-methods/3-class-extend-object/rabbit-extends-object.svg @@ -1 +1 @@ -call: function bind: function ...Function.prototypeconstructorObjectRabbit[[Prototype]][[Prototype]]constructorcall: function bind: function ...Function.prototypeRabbit[[Prototype]]constructorclass Rabbitclass Rabbit extends Object \ No newline at end of file +call: function bind: function ...Function.prototypeconstructorObjectRabbit[[Prototype]][[Prototype]]constructorcall: function bind: function ...Function.prototypeRabbit[[Prototype]]constructorclass Rabbitclass Rabbit extends Object \ No newline at end of file diff --git a/1-js/09-classes/03-static-properties-methods/animal-rabbit-static.svg b/1-js/09-classes/03-static-properties-methods/animal-rabbit-static.svg index 3e354b895d..f035923e5a 100644 --- a/1-js/09-classes/03-static-properties-methods/animal-rabbit-static.svg +++ b/1-js/09-classes/03-static-properties-methods/animal-rabbit-static.svg @@ -1 +1 @@ -constructor: Animal run: functionAnimal.prototypeconstructor: Rabbit hide: functionRabbit.prototypeAnimalRabbitrabbit[[Prototype]][[Prototype]][[Prototype]]prototypeprototypecomparename: "White Rabbit" \ No newline at end of file +constructor: Animal run: functionAnimal.prototypeconstructor: Rabbit hide: functionRabbit.prototypeAnimalRabbitrabbit[[Prototype]][[Prototype]][[Prototype]]prototypeprototypecomparename: "White Rabbit" \ No newline at end of file diff --git a/1-js/09-classes/05-extend-natives/object-date-inheritance.svg b/1-js/09-classes/05-extend-natives/object-date-inheritance.svg index be47d7fd96..b986d6f44d 100644 --- a/1-js/09-classes/05-extend-natives/object-date-inheritance.svg +++ b/1-js/09-classes/05-extend-natives/object-date-inheritance.svg @@ -1 +1 @@ -constructor: Object toString: function hasOwnProperty: function ...Object.prototypeconstructor: Date toString: function getDate: function ...Date.prototypeObjectDatenew Date()[[Prototype]][[Prototype]]prototypeprototypedefineProperty keys ...now parse ...1 Jan 2019 \ No newline at end of file +constructor: Object toString: function hasOwnProperty: function ...Object.prototypeconstructor: Date toString: function getDate: function ...Date.prototypeObjectDatenew Date()[[Prototype]][[Prototype]]prototypeprototypedefineProperty keys ...now parse ...1 Jan 2019 \ No newline at end of file diff --git a/1-js/09-classes/06-instanceof/instanceof.svg b/1-js/09-classes/06-instanceof/instanceof.svg index d63b03a8a2..9938f8f322 100644 --- a/1-js/09-classes/06-instanceof/instanceof.svg +++ b/1-js/09-classes/06-instanceof/instanceof.svg @@ -1 +1 @@ -Animal.prototypeObject.prototypeRabbit.prototype[[Prototype]]rabbit[[Prototype]][[Prototype]]null[[Prototype]]= Animal.prototype? \ No newline at end of file +Animal.prototypeObject.prototypeRabbit.prototype[[Prototype]]rabbit[[Prototype]][[Prototype]]null[[Prototype]]= Animal.prototype? \ No newline at end of file diff --git a/1-js/09-classes/07-mixins/mixin-inheritance.svg b/1-js/09-classes/07-mixins/mixin-inheritance.svg index 1fdc223936..2d0a61c015 100644 --- a/1-js/09-classes/07-mixins/mixin-inheritance.svg +++ b/1-js/09-classes/07-mixins/mixin-inheritance.svg @@ -1 +1 @@ -sayHi: function sayBye: functionsayHiMixinsay: functionsayMixin[[Prototype]]constructor: User sayHi: function sayBye: functionUser.prototype[[Prototype]]name: ...user[[HomeObject] \ No newline at end of file +sayHi: function sayBye: functionsayHiMixinsay: functionsayMixin[[Prototype]]constructor: User sayHi: function sayBye: functionUser.prototype[[Prototype]]name: ...user[[HomeObject] \ No newline at end of file diff --git a/1-js/10-error-handling/1-try-catch/try-catch-flow.svg b/1-js/10-error-handling/1-try-catch/try-catch-flow.svg index 2c0d71348c..fe12ae1433 100644 --- a/1-js/10-error-handling/1-try-catch/try-catch-flow.svg +++ b/1-js/10-error-handling/1-try-catch/try-catch-flow.svg @@ -1 +1 @@ -BeginNo ErrorsAn error occured in the codeIgnore catch blockIgnore the rest of tryExecute catch blocktry { }// code... \ No newline at end of file +BeginNo ErrorsAn error occured in the codeIgnore catch blockIgnore the rest of tryExecute catch blocktry { }// code... \ No newline at end of file diff --git a/1-js/11-async/01-callbacks/callback-hell.svg b/1-js/11-async/01-callbacks/callback-hell.svg index bd53e44322..e1d09a13b0 100644 --- a/1-js/11-async/01-callbacks/callback-hell.svg +++ b/1-js/11-async/01-callbacks/callback-hell.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/1-js/11-async/02-promise-basics/promise-reject-1.svg b/1-js/11-async/02-promise-basics/promise-reject-1.svg index 777e477394..2534b5b3c5 100644 --- a/1-js/11-async/02-promise-basics/promise-reject-1.svg +++ b/1-js/11-async/02-promise-basics/promise-reject-1.svg @@ -1 +1 @@ -new Promise(executor)state: "pending" result: undefinedreject(error)state: "rejected" result: error \ No newline at end of file +new Promise(executor)state: "pending" result: undefinedreject(error)state: "rejected" result: error \ No newline at end of file diff --git a/1-js/11-async/02-promise-basics/promise-resolve-1.svg b/1-js/11-async/02-promise-basics/promise-resolve-1.svg index f1f34eaee1..b47dab9bbd 100644 --- a/1-js/11-async/02-promise-basics/promise-resolve-1.svg +++ b/1-js/11-async/02-promise-basics/promise-resolve-1.svg @@ -1 +1 @@ -new Promise(executor)state: "pending" result: undefinedresolve("done")state: "fulfilled" result: "done" \ No newline at end of file +new Promise(executor)state: "pending" result: undefinedresolve("done")state: "fulfilled" result: "done" \ No newline at end of file diff --git a/1-js/11-async/02-promise-basics/promise-resolve-reject.svg b/1-js/11-async/02-promise-basics/promise-resolve-reject.svg index 80593a3a4b..be423897ec 100644 --- a/1-js/11-async/02-promise-basics/promise-resolve-reject.svg +++ b/1-js/11-async/02-promise-basics/promise-resolve-reject.svg @@ -1 +1 @@ -new Promise(executor)state: "pending" result: undefinedresolve(value)reject(error)state: "fulfilled" result: valuestate: "rejected" result: error \ No newline at end of file +new Promise(executor)state: "pending" result: undefinedresolve(value)reject(error)state: "fulfilled" result: valuestate: "rejected" result: error \ No newline at end of file diff --git a/1-js/11-async/03-promise-chaining/promise-handler-variants.svg b/1-js/11-async/03-promise-chaining/promise-handler-variants.svg index 664a4dbebc..be9b5a57d1 100644 --- a/1-js/11-async/03-promise-chaining/promise-handler-variants.svg +++ b/1-js/11-async/03-promise-chaining/promise-handler-variants.svg @@ -1 +1 @@ -return valuereturn promisethrow errorstate: "fulfilled" result: valuestate: "rejected" result: error...with the result of the new promise...state: "pending" result: undefinedthe call of .then(handler) always returns a promise:if handler ends with…that promise settles with: \ No newline at end of file +return valuereturn promisethrow errorstate: "fulfilled" result: valuestate: "rejected" result: error...with the result of the new promise...state: "pending" result: undefinedthe call of .then(handler) always returns a promise:if handler ends with…that promise settles with: \ No newline at end of file diff --git a/1-js/11-async/03-promise-chaining/promise-then-chain.svg b/1-js/11-async/03-promise-chaining/promise-then-chain.svg index fb60142fbd..39e4c2503d 100644 --- a/1-js/11-async/03-promise-chaining/promise-then-chain.svg +++ b/1-js/11-async/03-promise-chaining/promise-then-chain.svg @@ -1 +1 @@ -.thennew Promiseresolve(1)return 2.thenreturn 4.then \ No newline at end of file +.thennew Promiseresolve(1)return 2.thenreturn 4.then \ No newline at end of file diff --git a/1-js/11-async/03-promise-chaining/promise-then-many.svg b/1-js/11-async/03-promise-chaining/promise-then-many.svg index 8fea7beaaf..7711755682 100644 --- a/1-js/11-async/03-promise-chaining/promise-then-many.svg +++ b/1-js/11-async/03-promise-chaining/promise-then-many.svg @@ -1 +1 @@ -.thennew Promiseresolve(1).then.then \ No newline at end of file +.thennew Promiseresolve(1).then.then \ No newline at end of file diff --git a/1-js/11-async/04-promise-error-handling/promise-then-chain.svg b/1-js/11-async/04-promise-error-handling/promise-then-chain.svg index fb60142fbd..39e4c2503d 100644 --- a/1-js/11-async/04-promise-error-handling/promise-then-chain.svg +++ b/1-js/11-async/04-promise-error-handling/promise-then-chain.svg @@ -1 +1 @@ -.thennew Promiseresolve(1)return 2.thenreturn 4.then \ No newline at end of file +.thennew Promiseresolve(1)return 2.thenreturn 4.then \ No newline at end of file diff --git a/1-js/11-async/04-promise-error-handling/promise-then-many.svg b/1-js/11-async/04-promise-error-handling/promise-then-many.svg index 8fea7beaaf..7711755682 100644 --- a/1-js/11-async/04-promise-error-handling/promise-then-many.svg +++ b/1-js/11-async/04-promise-error-handling/promise-then-many.svg @@ -1 +1 @@ -.thennew Promiseresolve(1).then.then \ No newline at end of file +.thennew Promiseresolve(1).then.then \ No newline at end of file diff --git a/1-js/11-async/07-microtask-queue/promiseQueue.svg b/1-js/11-async/07-microtask-queue/promiseQueue.svg index c802c44a01..0257192b34 100644 --- a/1-js/11-async/07-microtask-queue/promiseQueue.svg +++ b/1-js/11-async/07-microtask-queue/promiseQueue.svg @@ -1 +1 @@ -promise . then ( handler ); ... alert ( "code finished" );handler enqueuedqueued handler runsscript execution finished \ No newline at end of file +promise . then ( handler ); ... alert ( "code finished" );handler enqueuedqueued handler runsscript execution finished \ No newline at end of file diff --git a/1-js/12-generators-iterators/1-generators/genYield2-2.svg b/1-js/12-generators-iterators/1-generators/genYield2-2.svg index f45e69324d..d175a10298 100644 --- a/1-js/12-generators-iterators/1-generators/genYield2-2.svg +++ b/1-js/12-generators-iterators/1-generators/genYield2-2.svg @@ -1 +1 @@ -"2 + 2 = ?""3 * 3 = ?". next ( 4 ). next ( 9 )GeneratorCalling code \ No newline at end of file +"2 + 2 = ?""3 * 3 = ?". next ( 4 ). next ( 9 )GeneratorCalling code \ No newline at end of file diff --git a/1-js/12-generators-iterators/1-generators/genYield2.svg b/1-js/12-generators-iterators/1-generators/genYield2.svg index 8d3e257c94..56aab21db3 100644 --- a/1-js/12-generators-iterators/1-generators/genYield2.svg +++ b/1-js/12-generators-iterators/1-generators/genYield2.svg @@ -1 +1 @@ -question = "2 + 2 = ?"GeneratorCalling code.next(4) \ No newline at end of file +question = "2 + 2 = ?"GeneratorCalling code.next(4) \ No newline at end of file diff --git a/1-js/12-generators-iterators/1-generators/generateSequence-1.svg b/1-js/12-generators-iterators/1-generators/generateSequence-1.svg index 138df324cc..4682c2f766 100644 --- a/1-js/12-generators-iterators/1-generators/generateSequence-1.svg +++ b/1-js/12-generators-iterators/1-generators/generateSequence-1.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/1-js/12-generators-iterators/1-generators/generateSequence-2.svg b/1-js/12-generators-iterators/1-generators/generateSequence-2.svg index 7478543a4b..35fa1dc101 100644 --- a/1-js/12-generators-iterators/1-generators/generateSequence-2.svg +++ b/1-js/12-generators-iterators/1-generators/generateSequence-2.svg @@ -1 +1 @@ -{value: 1, done: false} \ No newline at end of file +{value: 1, done: false} \ No newline at end of file diff --git a/1-js/12-generators-iterators/1-generators/generateSequence-3.svg b/1-js/12-generators-iterators/1-generators/generateSequence-3.svg index d32b114f98..3d25b57fe4 100644 --- a/1-js/12-generators-iterators/1-generators/generateSequence-3.svg +++ b/1-js/12-generators-iterators/1-generators/generateSequence-3.svg @@ -1 +1 @@ -{value: 2, done: false} \ No newline at end of file +{value: 2, done: false} \ No newline at end of file diff --git a/1-js/12-generators-iterators/1-generators/generateSequence-4.svg b/1-js/12-generators-iterators/1-generators/generateSequence-4.svg index 23049fcd21..1904fb613b 100644 --- a/1-js/12-generators-iterators/1-generators/generateSequence-4.svg +++ b/1-js/12-generators-iterators/1-generators/generateSequence-4.svg @@ -1 +1 @@ -{value: 3, done: true} \ No newline at end of file +{value: 3, done: true} \ No newline at end of file diff --git a/1-js/99-js-misc/01-proxy/proxy-inherit-admin.svg b/1-js/99-js-misc/01-proxy/proxy-inherit-admin.svg index 3fba64606b..774a5f2060 100644 --- a/1-js/99-js-misc/01-proxy/proxy-inherit-admin.svg +++ b/1-js/99-js-misc/01-proxy/proxy-inherit-admin.svg @@ -1 +1 @@ -_name: "Guest" name: getter_name: "Admin"user (proxied)original useradmin[[Prototype]] \ No newline at end of file +_name: "Guest" name: getter_name: "Admin"user (proxied)original useradmin[[Prototype]] \ No newline at end of file diff --git a/1-js/99-js-misc/01-proxy/proxy-inherit.svg b/1-js/99-js-misc/01-proxy/proxy-inherit.svg index 6c34c0f4ed..1bc7d82189 100644 --- a/1-js/99-js-misc/01-proxy/proxy-inherit.svg +++ b/1-js/99-js-misc/01-proxy/proxy-inherit.svg @@ -1 +1 @@ -_name: "Guest" name: getteruser (proxied)original user \ No newline at end of file +_name: "Guest" name: getteruser (proxied)original user \ No newline at end of file diff --git a/1-js/99-js-misc/01-proxy/proxy.svg b/1-js/99-js-misc/01-proxy/proxy.svg index 6b2224cfdc..6215a2d133 100644 --- a/1-js/99-js-misc/01-proxy/proxy.svg +++ b/1-js/99-js-misc/01-proxy/proxy.svg @@ -1 +1 @@ -test: 5proxytargetget proxy.test5 \ No newline at end of file +test: 5proxytargetget proxy.test5 \ No newline at end of file diff --git a/2-ui/1-document/01-browser-environment/windowObjects.svg b/2-ui/1-document/01-browser-environment/windowObjects.svg index b7e18bb347..b67b786a59 100644 --- a/2-ui/1-document/01-browser-environment/windowObjects.svg +++ b/2-ui/1-document/01-browser-environment/windowObjects.svg @@ -1 +1 @@ -windowdocumentObjectnavigatorscreenlocationframeshistoryArrayFunctionXMLHttpRequestBOMJavaScriptDOM \ No newline at end of file +windowdocumentObjectnavigatorscreenlocationframeshistoryArrayFunctionXMLHttpRequestBOMJavaScriptDOM \ No newline at end of file diff --git a/2-ui/1-document/02-dom-nodes/domconsole0.svg b/2-ui/1-document/02-dom-nodes/domconsole0.svg index eb99f193fe..1097780bc4 100644 --- a/2-ui/1-document/02-dom-nodes/domconsole0.svg +++ b/2-ui/1-document/02-dom-nodes/domconsole0.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/2-ui/1-document/02-dom-nodes/domconsole1.svg b/2-ui/1-document/02-dom-nodes/domconsole1.svg index 02ef5f0a65..dcdc5ea028 100644 --- a/2-ui/1-document/02-dom-nodes/domconsole1.svg +++ b/2-ui/1-document/02-dom-nodes/domconsole1.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/2-ui/1-document/02-dom-nodes/elk.svg b/2-ui/1-document/02-dom-nodes/elk.svg index 448eea9d13..e29bb9e0a4 100644 --- a/2-ui/1-document/02-dom-nodes/elk.svg +++ b/2-ui/1-document/02-dom-nodes/elk.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/2-ui/1-document/02-dom-nodes/inspect.svg b/2-ui/1-document/02-dom-nodes/inspect.svg index 60696ec0d5..180615c1fe 100644 --- a/2-ui/1-document/02-dom-nodes/inspect.svg +++ b/2-ui/1-document/02-dom-nodes/inspect.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/2-ui/1-document/03-dom-navigation/dom-links-elements.svg b/2-ui/1-document/03-dom-navigation/dom-links-elements.svg index fd0b2826a4..d70648a6ca 100644 --- a/2-ui/1-document/03-dom-navigation/dom-links-elements.svg +++ b/2-ui/1-document/03-dom-navigation/dom-links-elements.svg @@ -1 +1 @@ -document.documentElement <HTML>document.body (if inside body)parent Element<DIV>next Element Siblingprevious Element Siblingchildrenfirst Element Child last Element Child \ No newline at end of file +document.documentElement <HTML>document.body (if inside body)parent Element<DIV>next Element Siblingprevious Element Siblingchildrenfirst Element Child last Element Child \ No newline at end of file diff --git a/2-ui/1-document/03-dom-navigation/dom-links.svg b/2-ui/1-document/03-dom-navigation/dom-links.svg index 6c34bca4a4..f28361c3c8 100644 --- a/2-ui/1-document/03-dom-navigation/dom-links.svg +++ b/2-ui/1-document/03-dom-navigation/dom-links.svg @@ -1 +1 @@ -documentdocument.documentElement <HTML>document.body (if inside body)parentNode<DIV>nextSiblingpreviousSiblingchildNodesfirstChild lastChild \ No newline at end of file +documentdocument.documentElement <HTML>document.body (if inside body)parentNode<DIV>nextSiblingpreviousSiblingchildNodesfirstChild lastChild \ No newline at end of file diff --git a/2-ui/1-document/05-basic-dom-node-properties/dom-class-hierarchy.svg b/2-ui/1-document/05-basic-dom-node-properties/dom-class-hierarchy.svg index ccd93d5000..0d6637ca1f 100644 --- a/2-ui/1-document/05-basic-dom-node-properties/dom-class-hierarchy.svg +++ b/2-ui/1-document/05-basic-dom-node-properties/dom-class-hierarchy.svg @@ -1 +1 @@ -EventTargetNode Element HTMLElement HTMLBodyElement HTMLInputElement HTMLAnchorElement Document HTMLDocument CharacterData Document as a whole<input type="…"><body><a href="…">< div > ... </ div >Comment <!--comment-->Text "Hello" \ No newline at end of file +EventTargetNode Element HTMLElement HTMLBodyElement HTMLInputElement HTMLAnchorElement Document HTMLDocument CharacterData Document as a whole<input type="…"><body><a href="…">< div > ... </ div >Comment <!--comment-->Text "Hello" \ No newline at end of file diff --git a/2-ui/1-document/07-modifying-document/before-prepend-append-after.svg b/2-ui/1-document/07-modifying-document/before-prepend-append-after.svg index 0843713cec..5f2a8ee5d8 100644 --- a/2-ui/1-document/07-modifying-document/before-prepend-append-after.svg +++ b/2-ui/1-document/07-modifying-document/before-prepend-append-after.svg @@ -1 +1 @@ -ol.afterol.appendol.prependol.before(…nodes or strings) \ No newline at end of file +ol.afterol.appendol.prependol.before(…nodes or strings) \ No newline at end of file diff --git a/2-ui/1-document/07-modifying-document/insert-adjacent.svg b/2-ui/1-document/07-modifying-document/insert-adjacent.svg index e26fd023a1..774fc042aa 100644 --- a/2-ui/1-document/07-modifying-document/insert-adjacent.svg +++ b/2-ui/1-document/07-modifying-document/insert-adjacent.svg @@ -1 +1 @@ -ol.insertAdjacentHTML(*, html)afterendbeforeendafterbeginbeforebegin \ No newline at end of file +ol.insertAdjacentHTML(*, html)afterendbeforeendafterbeginbeforebegin \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/field.svg b/2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/field.svg index f5bd9f4f9c..728bb31fc3 100644 --- a/2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/field.svg +++ b/2-ui/1-document/09-size-and-scroll/4-put-ball-in-center/field.svg @@ -1 +1 @@ -(0,0)clientWidth \ No newline at end of file +(0,0)clientWidth \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-all.svg b/2-ui/1-document/09-size-and-scroll/metric-all.svg index 20a59e18d7..b4fe34c4b3 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-all.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-all.svg @@ -1 +1 @@ -Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.scrollHeightoffsetHeightscrollTopclientHeightoffsetTopclientLeftclientWidthclientTopoffsetLeftoffsetWidth \ No newline at end of file +Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.scrollHeightoffsetHeightscrollTopclientHeightoffsetTopclientLeftclientWidthclientTopoffsetLeftoffsetWidth \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-client-left-top-rtl.svg b/2-ui/1-document/09-size-and-scroll/metric-client-left-top-rtl.svg index e8dd3d60a0..71ee030095 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-client-left-top-rtl.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-client-left-top-rtl.svg @@ -1 +1 @@ -clientTop: 25px = borderclientLeft: 41px \ No newline at end of file +clientTop: 25px = borderclientLeft: 41px \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-client-left-top.svg b/2-ui/1-document/09-size-and-scroll/metric-client-left-top.svg index 8097afa78f..12dee148c4 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-client-left-top.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-client-left-top.svg @@ -1 +1 @@ -Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997.clientTop: 25px = borderclientLeft: 25px \ No newline at end of file +Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997.clientTop: 25px = borderclientLeft: 25px \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-client-width-height.svg b/2-ui/1-document/09-size-and-scroll/metric-client-width-height.svg index 2603b05fba..04811404c9 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-client-width-height.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-client-width-height.svg @@ -1 +1 @@ -border 25pxpadding 20pxcontent width: 284pxborder 25pxpadding 20pxscrollbar 16pxclientWidth = 20+284+20 = 324pxclientHeight: 240pxheight: 200pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with \ No newline at end of file +border 25pxpadding 20pxcontent width: 284pxborder 25pxpadding 20pxscrollbar 16pxclientWidth = 20+284+20 = 324pxclientHeight: 240pxheight: 200pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-client-width-nopadding.svg b/2-ui/1-document/09-size-and-scroll/metric-client-width-nopadding.svg index 330d2a7c04..019b081f4c 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-client-width-nopadding.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-client-width-nopadding.svg @@ -1 +1 @@ -clientWidth: 284px = content widthCSS width: 300pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with padding: 0; width: 300px; \ No newline at end of file +clientWidth: 284px = content widthCSS width: 300pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with padding: 0; width: 300px; \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-css.svg b/2-ui/1-document/09-size-and-scroll/metric-css.svg index 1f2e5f780e..d39ea795c9 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-css.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-css.svg @@ -1 +1 @@ -padding: 20pxheight: 200pxpadding: 20pxborder 25pxpadding 20pxcontent width: 284pxborder 25pxpadding 20pxscrollbar 16pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with \ No newline at end of file +padding: 20pxheight: 200pxpadding: 20pxborder 25pxpadding 20pxcontent width: 284pxborder 25pxpadding 20pxscrollbar 16pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-offset-parent.svg b/2-ui/1-document/09-size-and-scroll/metric-offset-parent.svg index 2d108473ee..62a585641b 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-offset-parent.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-offset-parent.svg @@ -1 +1 @@ -offsetTop: 180pxoffsetLeft: 180pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoftposition: absolute; left: 180px; top: 180px;offsetParent <MAIN> <DIV> \ No newline at end of file +offsetTop: 180pxoffsetLeft: 180pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoftposition: absolute; left: 180px; top: 180px;offsetParent <MAIN> <DIV> \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-offset-width-height.svg b/2-ui/1-document/09-size-and-scroll/metric-offset-width-height.svg index 4d30d90cc8..46f8368a98 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-offset-width-height.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-offset-width-height.svg @@ -1 +1 @@ -border 25pxpadding 20pxcontent width: 284pxheight: 200pxborder 25pxpadding 20pxscrollbar 16pxoffsetWidth = 25+20+284+20+16+25 = 390pxoffsetHeight: 290pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with \ No newline at end of file +border 25pxpadding 20pxcontent width: 284pxheight: 200pxborder 25pxpadding 20pxscrollbar 16pxoffsetWidth = 25+20+284+20+16+25 = 390pxoffsetHeight: 290pxIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-scroll-top.svg b/2-ui/1-document/09-size-and-scroll/metric-scroll-top.svg index 7f72de422a..a8d2b5b3d4 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-scroll-top.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-scroll-top.svg @@ -1 +1 @@ -Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.scrollTopscrollHeight: 723px \ No newline at end of file +Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.scrollTopscrollHeight: 723px \ No newline at end of file diff --git a/2-ui/1-document/09-size-and-scroll/metric-scroll-width-height.svg b/2-ui/1-document/09-size-and-scroll/metric-scroll-width-height.svg index 75a24e3bc3..407acb5a30 100644 --- a/2-ui/1-document/09-size-and-scroll/metric-scroll-width-height.svg +++ b/2-ui/1-document/09-size-and-scroll/metric-scroll-width-height.svg @@ -1 +1 @@ -Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.scrollHeight: 723pxscrollWidth = 324px \ No newline at end of file +Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.scrollHeight: 723pxscrollWidth = 324px \ No newline at end of file diff --git a/2-ui/1-document/10-size-and-scroll-window/document-client-width-height.svg b/2-ui/1-document/10-size-and-scroll-window/document-client-width-height.svg index 18cd37a749..d0c112b59a 100644 --- a/2-ui/1-document/10-size-and-scroll-window/document-client-width-height.svg +++ b/2-ui/1-document/10-size-and-scroll-window/document-client-width-height.svg @@ -1 +1 @@ -documentElement.clientHeightdocumentElement.clientWidth \ No newline at end of file +documentElement.clientHeightdocumentElement.clientWidth \ No newline at end of file diff --git a/2-ui/1-document/11-coordinates/coordinates-negative.svg b/2-ui/1-document/11-coordinates/coordinates-negative.svg index 4f2e78687c..afdb02ec74 100644 --- a/2-ui/1-document/11-coordinates/coordinates-negative.svg +++ b/2-ui/1-document/11-coordinates/coordinates-negative.svg @@ -1 +1 @@ -bottom(x,y)(x,y)leftrightIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at top(width,height) \ No newline at end of file +bottom(x,y)(x,y)leftrightIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at top(width,height) \ No newline at end of file diff --git a/2-ui/1-document/11-coordinates/coordinates.svg b/2-ui/1-document/11-coordinates/coordinates.svg index 261ff66966..799389042a 100644 --- a/2-ui/1-document/11-coordinates/coordinates.svg +++ b/2-ui/1-document/11-coordinates/coordinates.svg @@ -1 +1 @@ -heightbottomxleftywidthrightIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at top \ No newline at end of file +heightbottomxleftywidthrightIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at top \ No newline at end of file diff --git a/2-ui/1-document/11-coordinates/document-and-window-coordinates-scrolled.svg b/2-ui/1-document/11-coordinates/document-and-window-coordinates-scrolled.svg index f03317f0c3..8e1de7d6f1 100644 --- a/2-ui/1-document/11-coordinates/document-and-window-coordinates-scrolled.svg +++ b/2-ui/1-document/11-coordinates/document-and-window-coordinates-scrolled.svg @@ -1 +1 @@ -Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.😍pageYclientYpageXclientXIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.pageYclientYpageXclientX😍 \ No newline at end of file +Introduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.😍pageYclientYpageXclientXIntroduction This Ecma Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. The development of this Standard started in November 1996. The first edition of this Ecma Standard was adopted by the Ecma General Assembly of June 1997. That Ecma Standard was submitted to ISO/ IEC JTC 1 for adoption under the fast-track procedure, and approved as international standard ISO/IEC 16262, in April 1998. The Ecma General Assembly of June 1998 approved the second edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the second edition are editorial in nature.pageYclientYpageXclientX😍 \ No newline at end of file diff --git a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/move-ball-coords.svg b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/move-ball-coords.svg index 2acc6b03ec..436a443932 100644 --- a/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/move-ball-coords.svg +++ b/2-ui/2-events/01-introduction-browser-events/04-move-ball-field/move-ball-coords.svg @@ -1 +1 @@ -ball.style.left?fieldCoords.leftevent.clientX \ No newline at end of file +ball.style.left?fieldCoords.leftevent.clientX \ No newline at end of file diff --git a/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel1.svg b/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel1.svg index 5bb161f6cb..7b87c0810f 100644 --- a/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel1.svg +++ b/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel1.svg @@ -1 +1 @@ -div (container)130x130ul (width: 9999px) \ No newline at end of file +div (container)130x130ul (width: 9999px) \ No newline at end of file diff --git a/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel2.svg b/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel2.svg index 81aea5b89e..2e58ff8912 100644 --- a/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel2.svg +++ b/2-ui/2-events/01-introduction-browser-events/07-carousel/carousel2.svg @@ -1 +1 @@ -div (container)130x130ul (margin-left: -350px) \ No newline at end of file +div (container)130x130ul (margin-left: -350px) \ No newline at end of file diff --git a/2-ui/2-events/02-bubbling-and-capturing/event-order-bubbling.svg b/2-ui/2-events/02-bubbling-and-capturing/event-order-bubbling.svg index 2ea88f0812..86c979d5e7 100644 --- a/2-ui/2-events/02-bubbling-and-capturing/event-order-bubbling.svg +++ b/2-ui/2-events/02-bubbling-and-capturing/event-order-bubbling.svg @@ -1 +1 @@ -123Most deeply nested element \ No newline at end of file +123Most deeply nested element \ No newline at end of file diff --git a/2-ui/2-events/02-bubbling-and-capturing/eventflow.svg b/2-ui/2-events/02-bubbling-and-capturing/eventflow.svg index 566064cd6b..ccfef98e5a 100644 --- a/2-ui/2-events/02-bubbling-and-capturing/eventflow.svg +++ b/2-ui/2-events/02-bubbling-and-capturing/eventflow.svg @@ -1 +1 @@ -WindowDocument<html><body><table><tbody><tr><tr><td>Shady Grove<td>Aeolian<td>Over the River,Charlie<td>DorianTargetPhase(2)CapturePhase(1)BubblingPhase(3) \ No newline at end of file +WindowDocument<html><body><table><tbody><tr><tr><td>Shady Grove<td>Aeolian<td>Over the River,Charlie<td>DorianTargetPhase(2)CapturePhase(1)BubblingPhase(3) \ No newline at end of file diff --git a/2-ui/2-events/03-event-delegation/bagua-bubble.svg b/2-ui/2-events/03-event-delegation/bagua-bubble.svg index 4ae67102dd..fa81181fdd 100644 --- a/2-ui/2-events/03-event-delegation/bagua-bubble.svg +++ b/2-ui/2-events/03-event-delegation/bagua-bubble.svg @@ -1 +1 @@ -<table><td><strong>event.target \ No newline at end of file +<table><td><strong>event.target \ No newline at end of file diff --git a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-bubble-nested.svg b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-bubble-nested.svg index 6044eff17d..f4e6eb8247 100644 --- a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-bubble-nested.svg +++ b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-bubble-nested.svg @@ -1 +1 @@ -mouseoutmouseover#parent#child \ No newline at end of file +mouseoutmouseover#parent#child \ No newline at end of file diff --git a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-from-outside.svg b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-from-outside.svg index 22335b52e1..084101d178 100644 --- a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-from-outside.svg +++ b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-from-outside.svg @@ -1 +1 @@ -#TOtargetrelatedTarget = null \ No newline at end of file +#TOtargetrelatedTarget = null \ No newline at end of file diff --git a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-over-elems.svg b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-over-elems.svg index 437f03b102..dae29a7a8c 100644 --- a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-over-elems.svg +++ b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout-over-elems.svg @@ -1 +1 @@ -#TO#FROM<DIV><DIV><DIV>mouseovermouseout \ No newline at end of file +#TO#FROM<DIV><DIV><DIV>mouseovermouseout \ No newline at end of file diff --git a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout.svg b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout.svg index 1277ddff55..b6654a6557 100644 --- a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout.svg +++ b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-mouseout.svg @@ -1 +1 @@ -<DIV>mouseovermouseout \ No newline at end of file +<DIV>mouseovermouseout \ No newline at end of file diff --git a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-to-child.svg b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-to-child.svg index 78210845b4..9ff262cb3e 100644 --- a/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-to-child.svg +++ b/2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseover-to-child.svg @@ -1 +1 @@ -mouseoutmouseover#parent#child \ No newline at end of file +mouseoutmouseover#parent#child \ No newline at end of file diff --git a/2-ui/3-event-details/4-mouse-drag-and-drop/2-drag-heroes/solution.view/field.svg b/2-ui/3-event-details/4-mouse-drag-and-drop/2-drag-heroes/solution.view/field.svg index f5bd9f4f9c..728bb31fc3 100644 --- a/2-ui/3-event-details/4-mouse-drag-and-drop/2-drag-heroes/solution.view/field.svg +++ b/2-ui/3-event-details/4-mouse-drag-and-drop/2-drag-heroes/solution.view/field.svg @@ -1 +1 @@ -(0,0)clientWidth \ No newline at end of file +(0,0)clientWidth \ No newline at end of file diff --git a/2-ui/3-event-details/4-mouse-drag-and-drop/ball_shift.svg b/2-ui/3-event-details/4-mouse-drag-and-drop/ball_shift.svg index 29fdb31ef0..d1de1098e5 100644 --- a/2-ui/3-event-details/4-mouse-drag-and-drop/ball_shift.svg +++ b/2-ui/3-event-details/4-mouse-drag-and-drop/ball_shift.svg @@ -1 +1 @@ -shiftXshiftY \ No newline at end of file +shiftXshiftY \ No newline at end of file diff --git a/2-ui/3-event-details/7-keyboard-events/german-layout.svg b/2-ui/3-event-details/7-keyboard-events/german-layout.svg index 7ac9a4008b..556a7f6462 100644 --- a/2-ui/3-event-details/7-keyboard-events/german-layout.svg +++ b/2-ui/3-event-details/7-keyboard-events/german-layout.svg @@ -1 +1 @@ -StrgStrgAl tAlt GrWinWinMenu \ No newline at end of file +StrgStrgAl tAlt GrWinWinMenu \ No newline at end of file diff --git a/2-ui/3-event-details/7-keyboard-events/us-layout.svg b/2-ui/3-event-details/7-keyboard-events/us-layout.svg index 353f225f1b..0fe31085d0 100644 --- a/2-ui/3-event-details/7-keyboard-events/us-layout.svg +++ b/2-ui/3-event-details/7-keyboard-events/us-layout.svg @@ -1 +1 @@ -Caps LockShiftShift \ No newline at end of file +Caps LockShiftShift \ No newline at end of file diff --git a/2-ui/4-forms-controls/1-form-elements/form-navigation.svg b/2-ui/4-forms-controls/1-form-elements/form-navigation.svg index 2c9080703d..8e9bb21b78 100644 --- a/2-ui/4-forms-controls/1-form-elements/form-navigation.svg +++ b/2-ui/4-forms-controls/1-form-elements/form-navigation.svg @@ -1 +1 @@ -formelements[0]elements[1]elements[n]...formform \ No newline at end of file +formelements[0]elements[1]elements[n]...formform \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/range-example-p-0-1.svg b/2-ui/99-ui-misc/02-selection-range/range-example-p-0-1.svg index a97d1b47ad..36b7e59a83 100644 --- a/2-ui/99-ui-misc/02-selection-range/range-example-p-0-1.svg +++ b/2-ui/99-ui-misc/02-selection-range/range-example-p-0-1.svg @@ -1 +1 @@ -0123 \ No newline at end of file +0123 \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/range-example-p-1-3.svg b/2-ui/99-ui-misc/02-selection-range/range-example-p-1-3.svg index 2a8f9aca32..d584640270 100644 --- a/2-ui/99-ui-misc/02-selection-range/range-example-p-1-3.svg +++ b/2-ui/99-ui-misc/02-selection-range/range-example-p-1-3.svg @@ -1 +1 @@ -0123 \ No newline at end of file +0123 \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3-range.svg b/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3-range.svg index 32843436d8..c2c095c441 100644 --- a/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3-range.svg +++ b/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3-range.svg @@ -1 +1 @@ -startContainer (<p>.firstChild)startOffset (=2)commonAncestorContainer (<p>)endContainer (<b>.firstChild)endOffset (=3) \ No newline at end of file +startContainer (<p>.firstChild)startOffset (=2)commonAncestorContainer (<p>)endContainer (<b>.firstChild)endOffset (=3) \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3.svg b/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3.svg index 859f755ce1..e8cd706bd7 100644 --- a/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3.svg +++ b/2-ui/99-ui-misc/02-selection-range/range-example-p-2-b-3.svg @@ -1 +1 @@ -0123 \ No newline at end of file +0123 \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/range-hello-1.svg b/2-ui/99-ui-misc/02-selection-range/range-hello-1.svg index 2951607a2d..018b2511c8 100644 --- a/2-ui/99-ui-misc/02-selection-range/range-hello-1.svg +++ b/2-ui/99-ui-misc/02-selection-range/range-hello-1.svg @@ -1 +1 @@ -<p>Hello</p>p.firstChild \ No newline at end of file +<p>Hello</p>p.firstChild \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/selection-direction-backward.svg b/2-ui/99-ui-misc/02-selection-range/selection-direction-backward.svg index 85615d38ff..4d17a69f09 100644 --- a/2-ui/99-ui-misc/02-selection-range/selection-direction-backward.svg +++ b/2-ui/99-ui-misc/02-selection-range/selection-direction-backward.svg @@ -1 +1 @@ -focusanchormouse move direction \ No newline at end of file +focusanchormouse move direction \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/selection-direction-forward.svg b/2-ui/99-ui-misc/02-selection-range/selection-direction-forward.svg index 511b00a261..5eb8d4f797 100644 --- a/2-ui/99-ui-misc/02-selection-range/selection-direction-forward.svg +++ b/2-ui/99-ui-misc/02-selection-range/selection-direction-forward.svg @@ -1 +1 @@ -anchorfocusmouse move direction \ No newline at end of file +anchorfocusmouse move direction \ No newline at end of file diff --git a/2-ui/99-ui-misc/02-selection-range/selection-firefox.svg b/2-ui/99-ui-misc/02-selection-range/selection-firefox.svg index aa7ff1eb73..d6e2e0e9f9 100644 --- a/2-ui/99-ui-misc/02-selection-range/selection-firefox.svg +++ b/2-ui/99-ui-misc/02-selection-range/selection-firefox.svg @@ -1 +1 @@ -selection \ No newline at end of file +selection \ No newline at end of file diff --git a/2-ui/99-ui-misc/03-event-loop/eventLoop-full.svg b/2-ui/99-ui-misc/03-event-loop/eventLoop-full.svg index 593cbab9b3..a4fc7c2e5b 100644 --- a/2-ui/99-ui-misc/03-event-loop/eventLoop-full.svg +++ b/2-ui/99-ui-misc/03-event-loop/eventLoop-full.svg @@ -1 +1 @@ -...mousemoveevent looprendermicrotasksrendermicrotasksscriptsetTimeout \ No newline at end of file +...mousemoveevent looprendermicrotasksrendermicrotasksscriptsetTimeout \ No newline at end of file diff --git a/2-ui/99-ui-misc/03-event-loop/eventLoop.svg b/2-ui/99-ui-misc/03-event-loop/eventLoop.svg index 6dc459ef8a..e2e7e74935 100644 --- a/2-ui/99-ui-misc/03-event-loop/eventLoop.svg +++ b/2-ui/99-ui-misc/03-event-loop/eventLoop.svg @@ -1 +1 @@ -...mousemovescriptevent loopmacrotask queuesetTimeout \ No newline at end of file +...mousemovescriptevent loopmacrotask queuesetTimeout \ No newline at end of file diff --git a/4-binary/01-arraybuffer-binary-arrays/8bit-integer-256.svg b/4-binary/01-arraybuffer-binary-arrays/8bit-integer-256.svg index b697d63043..593dd1808a 100644 --- a/4-binary/01-arraybuffer-binary-arrays/8bit-integer-256.svg +++ b/4-binary/01-arraybuffer-binary-arrays/8bit-integer-256.svg @@ -1 +1 @@ -8-bit integer256 \ No newline at end of file +8-bit integer256 \ No newline at end of file diff --git a/4-binary/01-arraybuffer-binary-arrays/8bit-integer-257.svg b/4-binary/01-arraybuffer-binary-arrays/8bit-integer-257.svg index 8e3074fdf3..f678c6899d 100644 --- a/4-binary/01-arraybuffer-binary-arrays/8bit-integer-257.svg +++ b/4-binary/01-arraybuffer-binary-arrays/8bit-integer-257.svg @@ -1 +1 @@ -8-bit integer257 \ No newline at end of file +8-bit integer257 \ No newline at end of file diff --git a/4-binary/01-arraybuffer-binary-arrays/arraybuffer-view-buffersource.svg b/4-binary/01-arraybuffer-binary-arrays/arraybuffer-view-buffersource.svg index b9de47de1e..fdac45e905 100644 --- a/4-binary/01-arraybuffer-binary-arrays/arraybuffer-view-buffersource.svg +++ b/4-binary/01-arraybuffer-binary-arrays/arraybuffer-view-buffersource.svg @@ -1 +1 @@ -02134567012301new ArrayBuffer(16)ArrayBufferViewUint16Array Int16ArrayUint8Array Int8Array Uint8ClampedArrayUint32Array Int32Array Float32ArrayFloat64ArrayDataViewget/setUint8(offset) get/setFloat32(offset)...BufferSource1023456789101112131415 \ No newline at end of file +02134567012301new ArrayBuffer(16)ArrayBufferViewUint16Array Int16ArrayUint8Array Int8Array Uint8ClampedArrayUint32Array Int32Array Float32ArrayFloat64ArrayDataViewget/setUint8(offset) get/setFloat32(offset)...BufferSource1023456789101112131415 \ No newline at end of file diff --git a/4-binary/01-arraybuffer-binary-arrays/arraybuffer-views.svg b/4-binary/01-arraybuffer-binary-arrays/arraybuffer-views.svg index b022796ad2..271b7a4b69 100644 --- a/4-binary/01-arraybuffer-binary-arrays/arraybuffer-views.svg +++ b/4-binary/01-arraybuffer-binary-arrays/arraybuffer-views.svg @@ -1 +1 @@ -100213234567891011121314154567012301new ArrayBuffer(16)Uint16ArrayUint8ArrayUint32ArrayFloat64Array \ No newline at end of file +100213234567891011121314154567012301new ArrayBuffer(16)Uint16ArrayUint8ArrayUint32ArrayFloat64Array \ No newline at end of file diff --git a/4-binary/03-blob/blob.svg b/4-binary/03-blob/blob.svg index 8f42454516..f38245d167 100644 --- a/4-binary/03-blob/blob.svg +++ b/4-binary/03-blob/blob.svg @@ -1 +1 @@ -image/pngblob1blob2strbuffer...typeBlobblobParts+= \ No newline at end of file +image/pngblob1blob2strbuffer...typeBlobblobParts+= \ No newline at end of file diff --git a/5-network/05-fetch-crossorigin/cors-gmail-messages.svg b/5-network/05-fetch-crossorigin/cors-gmail-messages.svg index c24aac1401..7f9d2ebe1a 100644 --- a/5-network/05-fetch-crossorigin/cors-gmail-messages.svg +++ b/5-network/05-fetch-crossorigin/cors-gmail-messages.svg @@ -1 +1 @@ -evil.comgot the cookie? okay!gmail.comGET /messagescookie: user=John{"messages": [...]} \ No newline at end of file +evil.comgot the cookie? okay!gmail.comGET /messagescookie: user=John{"messages": [...]} \ No newline at end of file diff --git a/5-network/05-fetch-crossorigin/xhr-another-domain.svg b/5-network/05-fetch-crossorigin/xhr-another-domain.svg index 2ed70febde..ab1ab9d1fd 100644 --- a/5-network/05-fetch-crossorigin/xhr-another-domain.svg +++ b/5-network/05-fetch-crossorigin/xhr-another-domain.svg @@ -1 +1 @@ -JavaScriptBrowserServerOrigin: https://javascript.infoHTTP-requestfetch()HTTP-responseAccess-Control-Allow-Origin: * (or https://javascript.info)if the header allows, then success,otherwise fail \ No newline at end of file +JavaScriptBrowserServerOrigin: https://javascript.infoHTTP-requestfetch()HTTP-responseAccess-Control-Allow-Origin: * (or https://javascript.info)if the header allows, then success,otherwise fail \ No newline at end of file diff --git a/5-network/05-fetch-crossorigin/xhr-preflight.svg b/5-network/05-fetch-crossorigin/xhr-preflight.svg index 049572cee4..4699adeffc 100644 --- a/5-network/05-fetch-crossorigin/xhr-preflight.svg +++ b/5-network/05-fetch-crossorigin/xhr-preflight.svg @@ -1 +1 @@ -JavaScriptBrowserServerfetch()OPTIONSOrigin Access-Control-Request-Method Access-Control-Request-Headers200 OKAccess-Control-Allow-OriginMain HTTP-responseotherwise errorif allowed: success,OriginMain HTTP-requestpreflightif allowed1234 Access-Control-Allow-Origin Access-Control-Allow-Methods Access-Control-Allow-Headers Access-Control-Max-Age \ No newline at end of file +JavaScriptBrowserServerfetch()OPTIONSOrigin Access-Control-Request-Method Access-Control-Request-Headers200 OKAccess-Control-Allow-OriginMain HTTP-responseotherwise errorif allowed: success,OriginMain HTTP-requestpreflightif allowed1234 Access-Control-Allow-Origin Access-Control-Allow-Methods Access-Control-Allow-Headers Access-Control-Max-Age \ No newline at end of file diff --git a/5-network/07-url/url-object.svg b/5-network/07-url/url-object.svg index 628ccc13be..d9534be60e 100644 --- a/5-network/07-url/url-object.svg +++ b/5-network/07-url/url-object.svg @@ -1 +1 @@ -hreforiginhostprotocolhostnameportpathnamesearchhash \ No newline at end of file +hreforiginhostprotocolhostnameportpathnamesearchhash \ No newline at end of file diff --git a/5-network/10-long-polling/long-polling.svg b/5-network/10-long-polling/long-polling.svg index 045ef371f5..fa61b22da1 100644 --- a/5-network/10-long-polling/long-polling.svg +++ b/5-network/10-long-polling/long-polling.svg @@ -1 +1 @@ -BrowserServerrequestconnection hangsconnection breaks end of requestdatarequestconnection hangsrequestdataconnection breaks end of request \ No newline at end of file +BrowserServerrequestconnection hangsconnection breaks end of requestdatarequestconnection hangsrequestdataconnection breaks end of request \ No newline at end of file diff --git a/5-network/11-websocket/websocket-handshake.svg b/5-network/11-websocket/websocket-handshake.svg index 96c2cd3efb..1f41fc1eca 100644 --- a/5-network/11-websocket/websocket-handshake.svg +++ b/5-network/11-websocket/websocket-handshake.svg @@ -1 +1 @@ -BrowserServerHTTP-request"Hey, server, let's talk WebSocket?"HTTP-response "Okay!"WebSocket protocol \ No newline at end of file +BrowserServerHTTP-request"Hey, server, let's talk WebSocket?"HTTP-response "Okay!"WebSocket protocol \ No newline at end of file diff --git a/6-data-storage/01-cookie/cookie-third-party-2.svg b/6-data-storage/01-cookie/cookie-third-party-2.svg index 8912e4a68f..6db558d6e9 100644 --- a/6-data-storage/01-cookie/cookie-third-party-2.svg +++ b/6-data-storage/01-cookie/cookie-third-party-2.svg @@ -1 +1 @@ -<img src="https://ads.com/banner.png">site.comads.comGET /banner.pngcookie: id=123 \ No newline at end of file +<img src="https://ads.com/banner.png">site.comads.comGET /banner.pngcookie: id=123 \ No newline at end of file diff --git a/6-data-storage/01-cookie/cookie-third-party-3.svg b/6-data-storage/01-cookie/cookie-third-party-3.svg index ab38ea27fc..e9a5b00033 100644 --- a/6-data-storage/01-cookie/cookie-third-party-3.svg +++ b/6-data-storage/01-cookie/cookie-third-party-3.svg @@ -1 +1 @@ -<img src="https://ads.com/banner.png">other.comads.comGET /banner.pngcookie: id=123 \ No newline at end of file +<img src="https://ads.com/banner.png">other.comads.comGET /banner.pngcookie: id=123 \ No newline at end of file diff --git a/6-data-storage/01-cookie/cookie-third-party.svg b/6-data-storage/01-cookie/cookie-third-party.svg index 21c7cf94d0..b7ea2e8cdb 100644 --- a/6-data-storage/01-cookie/cookie-third-party.svg +++ b/6-data-storage/01-cookie/cookie-third-party.svg @@ -1 +1 @@ -<img src="https://ads.com/banner.png">site.comads.comGET /banner.pngSet-Cookie: id=123 \ No newline at end of file +<img src="https://ads.com/banner.png">site.comads.comGET /banner.pngSet-Cookie: id=123 \ No newline at end of file diff --git a/6-data-storage/01-cookie/cookie-xsrf.svg b/6-data-storage/01-cookie/cookie-xsrf.svg index 961a8078f7..49c4f5d0c1 100644 --- a/6-data-storage/01-cookie/cookie-xsrf.svg +++ b/6-data-storage/01-cookie/cookie-xsrf.svg @@ -1 +1 @@ -<form action="https://bank.com/pay"> .... </form>evil.comgot the cookie? okay!bank.comPOST /paycookie: user=John \ No newline at end of file +<form action="https://bank.com/pay"> .... </form>evil.comgot the cookie? okay!bank.comPOST /paycookie: user=John \ No newline at end of file diff --git a/6-data-storage/03-indexeddb/indexeddb-index.svg b/6-data-storage/03-indexeddb/indexeddb-index.svg index b7f34cadd3..c9d3dbe131 100644 --- a/6-data-storage/03-indexeddb/indexeddb-index.svg +++ b/6-data-storage/03-indexeddb/indexeddb-index.svg @@ -1 +1 @@ -id: 'html' price: 3id: 'css' price: 53: ['html'] 5: ['css'] 10: ['js','nodejs']id: 'js' price: 10id: 'nodejs' price: 10booksindex \ No newline at end of file +id: 'html' price: 3id: 'css' price: 53: ['html'] 5: ['css'] 10: ['js','nodejs']id: 'js' price: 10id: 'nodejs' price: 10booksindex \ No newline at end of file diff --git a/6-data-storage/03-indexeddb/indexeddb-structure.svg b/6-data-storage/03-indexeddb/indexeddb-structure.svg index a13e16918d..b774c7693c 100644 --- a/6-data-storage/03-indexeddb/indexeddb-structure.svg +++ b/6-data-storage/03-indexeddb/indexeddb-structure.svg @@ -1 +1 @@ -key1: value1DatabaseobjectStoreobjectStorekey3: value3key2: value2key4: value4key5: value5objectStorekey1: value1key3: value3key2: value2key4: value4key5: value5key1: value1key3: value3key2: value2key4: value4key5: value5 \ No newline at end of file +key1: value1DatabaseobjectStoreobjectStorekey3: value3key2: value2key4: value4key5: value5objectStorekey1: value1key3: value3key2: value2key4: value4key5: value5key1: value1key3: value3key2: value2key4: value4key5: value5 \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier-car.svg b/7-animation/1-bezier-curve/bezier-car.svg index 9f3f31f27d..ca307e43c8 100644 --- a/7-animation/1-bezier-curve/bezier-car.svg +++ b/7-animation/1-bezier-curve/bezier-car.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier-letter.svg b/7-animation/1-bezier-curve/bezier-letter.svg index d384cc7acf..327375f49d 100644 --- a/7-animation/1-bezier-curve/bezier-letter.svg +++ b/7-animation/1-bezier-curve/bezier-letter.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier-vase.svg b/7-animation/1-bezier-curve/bezier-vase.svg index ccc09690a9..51e476a8f6 100644 --- a/7-animation/1-bezier-curve/bezier-vase.svg +++ b/7-animation/1-bezier-curve/bezier-vase.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier2.svg b/7-animation/1-bezier-curve/bezier2.svg index b8dfe8f26d..e20658d48a 100644 --- a/7-animation/1-bezier-curve/bezier2.svg +++ b/7-animation/1-bezier-curve/bezier2.svg @@ -1 +1 @@ -12 \ No newline at end of file +12 \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier3-draw1.svg b/7-animation/1-bezier-curve/bezier3-draw1.svg index b3cf15aedc..87a3ad8a17 100644 --- a/7-animation/1-bezier-curve/bezier3-draw1.svg +++ b/7-animation/1-bezier-curve/bezier3-draw1.svg @@ -1 +1 @@ -1320.25t = 0.250.25 \ No newline at end of file +1320.25t = 0.250.25 \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier3-draw2.svg b/7-animation/1-bezier-curve/bezier3-draw2.svg index 4afe044541..a2fe79badb 100644 --- a/7-animation/1-bezier-curve/bezier3-draw2.svg +++ b/7-animation/1-bezier-curve/bezier3-draw2.svg @@ -1 +1 @@ -1320.5t = 0.50.5 \ No newline at end of file +1320.5t = 0.50.5 \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier3-e.svg b/7-animation/1-bezier-curve/bezier3-e.svg index a892258c4a..2ec599df05 100644 --- a/7-animation/1-bezier-curve/bezier3-e.svg +++ b/7-animation/1-bezier-curve/bezier3-e.svg @@ -1 +1 @@ -132 \ No newline at end of file +132 \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier3.svg b/7-animation/1-bezier-curve/bezier3.svg index ff95f88777..c1574e7816 100644 --- a/7-animation/1-bezier-curve/bezier3.svg +++ b/7-animation/1-bezier-curve/bezier3.svg @@ -1 +1 @@ -132 \ No newline at end of file +132 \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier4-e.svg b/7-animation/1-bezier-curve/bezier4-e.svg index 2e2bed1bac..cae5a19050 100644 --- a/7-animation/1-bezier-curve/bezier4-e.svg +++ b/7-animation/1-bezier-curve/bezier4-e.svg @@ -1 +1 @@ -1234 \ No newline at end of file +1234 \ No newline at end of file diff --git a/7-animation/1-bezier-curve/bezier4.svg b/7-animation/1-bezier-curve/bezier4.svg index 551184d1b9..ef834a5710 100644 --- a/7-animation/1-bezier-curve/bezier4.svg +++ b/7-animation/1-bezier-curve/bezier4.svg @@ -1 +1 @@ -1234 \ No newline at end of file +1234 \ No newline at end of file diff --git a/7-animation/2-css-animations/2-animate-logo-bezier-css/bezier-up.svg b/7-animation/2-css-animations/2-animate-logo-bezier-css/bezier-up.svg index 8275210796..f572c9076c 100644 --- a/7-animation/2-css-animations/2-animate-logo-bezier-css/bezier-up.svg +++ b/7-animation/2-css-animations/2-animate-logo-bezier-css/bezier-up.svg @@ -1 +1 @@ -1234 \ No newline at end of file +1234 \ No newline at end of file diff --git a/7-animation/2-css-animations/bezier-linear.svg b/7-animation/2-css-animations/bezier-linear.svg index 0c2e970f29..65068eae6b 100644 --- a/7-animation/2-css-animations/bezier-linear.svg +++ b/7-animation/2-css-animations/bezier-linear.svg @@ -1 +1 @@ -12 \ No newline at end of file +12 \ No newline at end of file diff --git a/7-animation/2-css-animations/bezier-train-over.svg b/7-animation/2-css-animations/bezier-train-over.svg index d12d092259..4f1814b551 100644 --- a/7-animation/2-css-animations/bezier-train-over.svg +++ b/7-animation/2-css-animations/bezier-train-over.svg @@ -1 +1 @@ -(1,1)(0,0)(0,1)(1,0)1243 \ No newline at end of file +(1,1)(0,0)(0,1)(1,0)1243 \ No newline at end of file diff --git a/7-animation/2-css-animations/ease-in-out.svg b/7-animation/2-css-animations/ease-in-out.svg index d5c8809d81..3a06ed5528 100644 --- a/7-animation/2-css-animations/ease-in-out.svg +++ b/7-animation/2-css-animations/ease-in-out.svg @@ -1 +1 @@ -1234 \ No newline at end of file +1234 \ No newline at end of file diff --git a/7-animation/2-css-animations/ease-in.svg b/7-animation/2-css-animations/ease-in.svg index 38c98ecbc1..2b42d3bede 100644 --- a/7-animation/2-css-animations/ease-in.svg +++ b/7-animation/2-css-animations/ease-in.svg @@ -1 +1 @@ -1234 \ No newline at end of file +1234 \ No newline at end of file diff --git a/7-animation/2-css-animations/ease-out.svg b/7-animation/2-css-animations/ease-out.svg index 9d22eeafd5..f6f59f7481 100644 --- a/7-animation/2-css-animations/ease-out.svg +++ b/7-animation/2-css-animations/ease-out.svg @@ -1 +1 @@ -1234 \ No newline at end of file +1234 \ No newline at end of file diff --git a/7-animation/2-css-animations/ease.svg b/7-animation/2-css-animations/ease.svg index 8f9d41fe83..ba4775b392 100644 --- a/7-animation/2-css-animations/ease.svg +++ b/7-animation/2-css-animations/ease.svg @@ -1 +1 @@ -1234 \ No newline at end of file +1234 \ No newline at end of file diff --git a/7-animation/2-css-animations/train-curve.svg b/7-animation/2-css-animations/train-curve.svg index 298dacd4c3..abf44b48b3 100644 --- a/7-animation/2-css-animations/train-curve.svg +++ b/7-animation/2-css-animations/train-curve.svg @@ -1 +1 @@ -1243 \ No newline at end of file +1243 \ No newline at end of file diff --git a/7-animation/3-js-animation/back.svg b/7-animation/3-js-animation/back.svg index fcef09ad75..f4123608a4 100644 --- a/7-animation/3-js-animation/back.svg +++ b/7-animation/3-js-animation/back.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/7-animation/3-js-animation/bezier-linear.svg b/7-animation/3-js-animation/bezier-linear.svg index 0c2e970f29..65068eae6b 100644 --- a/7-animation/3-js-animation/bezier-linear.svg +++ b/7-animation/3-js-animation/bezier-linear.svg @@ -1 +1 @@ -12 \ No newline at end of file +12 \ No newline at end of file diff --git a/7-animation/3-js-animation/bounce-inout.svg b/7-animation/3-js-animation/bounce-inout.svg index 363633abd4..0239b4b5a1 100644 --- a/7-animation/3-js-animation/bounce-inout.svg +++ b/7-animation/3-js-animation/bounce-inout.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/7-animation/3-js-animation/circ-ease.svg b/7-animation/3-js-animation/circ-ease.svg index a7db9abcf7..7fbaed8626 100644 --- a/7-animation/3-js-animation/circ-ease.svg +++ b/7-animation/3-js-animation/circ-ease.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/7-animation/3-js-animation/circ.svg b/7-animation/3-js-animation/circ.svg index 3595dd6248..29086c0300 100644 --- a/7-animation/3-js-animation/circ.svg +++ b/7-animation/3-js-animation/circ.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/7-animation/3-js-animation/elastic.svg b/7-animation/3-js-animation/elastic.svg index 17f04ccde7..a7b3e0c682 100644 --- a/7-animation/3-js-animation/elastic.svg +++ b/7-animation/3-js-animation/elastic.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/7-animation/3-js-animation/linear.svg b/7-animation/3-js-animation/linear.svg index daa753f0c2..b99e4b2a0f 100644 --- a/7-animation/3-js-animation/linear.svg +++ b/7-animation/3-js-animation/linear.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/7-animation/3-js-animation/quad.svg b/7-animation/3-js-animation/quad.svg index 25a4d00053..b1591a48e3 100644 --- a/7-animation/3-js-animation/quad.svg +++ b/7-animation/3-js-animation/quad.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/7-animation/3-js-animation/quint.svg b/7-animation/3-js-animation/quint.svg index c879ef9318..4d0307f232 100644 --- a/7-animation/3-js-animation/quint.svg +++ b/7-animation/3-js-animation/quint.svg @@ -1 +1 @@ -011 \ No newline at end of file +011 \ No newline at end of file diff --git a/8-web-components/1-webcomponents-intro/web-components-twitter.svg b/8-web-components/1-webcomponents-intro/web-components-twitter.svg index 8f59f789fb..ebe6a00728 100644 --- a/8-web-components/1-webcomponents-intro/web-components-twitter.svg +++ b/8-web-components/1-webcomponents-intro/web-components-twitter.svg @@ -1 +1 @@ -1243567 \ No newline at end of file +1243567 \ No newline at end of file diff --git a/8-web-components/5-slots-composition/shadow-dom-user-card.svg b/8-web-components/5-slots-composition/shadow-dom-user-card.svg index 6b420a0cd5..4e17709964 100644 --- a/8-web-components/5-slots-composition/shadow-dom-user-card.svg +++ b/8-web-components/5-slots-composition/shadow-dom-user-card.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/9-regular-expressions/02-regexp-character-classes/love-html5-classes.svg b/9-regular-expressions/02-regexp-character-classes/love-html5-classes.svg index 60d31da35f..84a1f735c2 100644 --- a/9-regular-expressions/02-regexp-character-classes/love-html5-classes.svg +++ b/9-regular-expressions/02-regexp-character-classes/love-html5-classes.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/9-regular-expressions/06-regexp-boundary/hello-java-boundaries.svg b/9-regular-expressions/06-regexp-boundary/hello-java-boundaries.svg index f842dc23f3..19216007a5 100644 --- a/9-regular-expressions/06-regexp-boundary/hello-java-boundaries.svg +++ b/9-regular-expressions/06-regexp-boundary/hello-java-boundaries.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy1.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy1.svg index d911ece21e..db4349c67e 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy1.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy1.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy2.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy2.svg index f821c6d8cb..838fdf3ada 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy2.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy2.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy3.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy3.svg index 9509882b2a..ca2f65eb10 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy3.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy3.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy4.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy4.svg index 8c5532b9f1..6dd9b07a3b 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy4.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy4.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy5.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy5.svg index 29cb0c533b..1bb24bfc6f 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy5.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy5.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy6.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy6.svg index 9f4b78b07b..dff9fd915b 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy6.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_greedy6.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy3.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy3.svg index 06b2b5f17d..9da4cc6e2b 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy3.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy3.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy4.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy4.svg index 60a09b5651..af18d194d7 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy4.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy4.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy5.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy5.svg index cec5b5d7cc..9e71307eda 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy5.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy5.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy6.svg b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy6.svg index db040e558b..dd5174b612 100644 --- a/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy6.svg +++ b/9-regular-expressions/10-regexp-greedy-and-lazy/witch_lazy6.svg @@ -1 +1 @@ -a "witch" and her "broom" is one \ No newline at end of file +a "witch" and her "broom" is one \ No newline at end of file diff --git a/figures.sketch b/figures.sketch index 1043331923..93f51bdebb 100644 Binary files a/figures.sketch and b/figures.sketch differ