Modern JavaScript Tutorial

Overview

The Modern JavaScript Tutorial

This repository hosts the English content of the Modern JavaScript Tutorial, published in https://javascript.info.

Translations

We'd like to make the tutorial available in many languages. Please help us to translate.

See https://javascript.info/translate for the details.

Contributions

We'd also like to collaborate on the tutorial with other people.

Something's wrong? A topic is missing? Explain it to people, add as PR 👏

You can edit the text in any editor. The tutorial uses enhanced "markdown" format, easy to grasp. And if you want to see how it looks on-site, there's a server to run the tutorial locally at https://github.com/javascript-tutorial/server.

The list of contributors is available at https://javascript.info/about#contributors.

Structure

Every chapter, article or a task has its folder.

The folder is named like N-url, where N is a number for the sorting purposes and url is the URL part with title of the material.

The type of the material is defined by the file inside the folder:

  • index.md stands for a chapter
  • article.md stands for an article
  • task.md stands for a task (solution must be provided in solution.md file as well)

Each of these files starts from the # Main header.

It's very easy to add something new.



Ilya Kantor @iliakan

Comments
  • Translate into Japanese

    Translate into Japanese

    I started to translate this into Japanese. https://github.com/KenjiI/javascript-tutorial-ja

    This issue is for informing about that. If some rules when I translate this, please let me know!

    opened by KenjiI 60
  • Request Korean distribution

    Request Korean distribution

    Hello, Ilya and the Team!

    The modern JavaScript tutorial in Korean is almost ready to publish(Part 1 is translated, almost), finally! 👍 👍 👍 https://github.com/javascript-tutorial/en.javascript.info/issues/1149

    Please let me know what I need to do to publish the Korean ver.

    opened by Violet-Bora-Lee 33
  • Publish Persian translations

    Publish Persian translations

    Hi, It seems like we've made it at fa.javascript.info! 🥳

    As mentioned in the "Publish" part of this page, it's now more than half-finished.

    image

    cc @iliakan

    opened by mahdyar 30
  • Add dark mode

    Add dark mode

    People sometimes like to read in low light environments, adding a dark mode button is a good idea for that. The changes will only be made in css and, of course, add a new button for that. If this approved I can work on this.

    opened by vcastrejont 27
  • Consider replacing all instances of `alert` with `console.log`

    Consider replacing all instances of `alert` with `console.log`

    As a modern tutorial on modern JS, please consider replacing all instances of the legacy alert() function with console.log. Especially for a work with the aim to teach proper JS and modern patterns, showing (let alone teaching) alert hampers learners by teaching them a function that no one should be using anymore. Looking at the dev console is an integral part of learning modern JS, and the Console API has been a much better friend to learners and seasons devs alike since 2010 than alert ever was.

    opened by Pomax 22
  • Terminology inconsistent --

    Terminology inconsistent -- "Chapter" and "Lesson"

    The word "Chapter" seems to be used for 3 different levels in the tutorial. On the sidebar for "The Javascript Language" section: https://javascript.info/js

    other such high-level sections, such as: Browser: Document, Events, Interfaces Frames and windows Binary data, files Network requests Storing data in the browser Animation Web components Regular expressions

    are referred to as "Sibling Chapters". However, if you go deeper into the "JavaScript Language" "chapter", you will then find lower-level divisions also referred to as "chapters": Sibling chapters An introduction JavaScript Fundamentals Code quality Objects: the basics Data types Advanced working with functions Object properties configuration Prototypes, inheritance Classes Error handling Promises, async/await Generators, advanced iteration Modules Miscellaneous

    Then, in one of those sections if you go to one of the options, like "Hello, World!" under JavaScript Fundamentals", you find that sections like "Hello, World!" and the like are referred to in the sidebar as "lessons" (which I think is totally appropriate). However, within the lessons, when prior lessons are referred to, they are generally called "chapters". E.g. in the lesson "Object to primitive conversion", we find:

    "In the chapter Type Conversions we’ve seen the rules for numeric, string and boolean conversions of primitives. But we left a gap for objects. Now, as we know about methods and symbols it becomes possible to fill it."

    But, using the terminology from the sidebar, "Type Conversions" is a "lesson", not a "chapter". In another lesson (sorry, don't recall which one right now) where an earlier lesson (lesson "Data types" within the chapter "JavaScript fundamentals" https://javascript.info/types) was called a "chapter" it was especially ambiguous because there actually was a chapter ("Data types" https://javascript.info/data-types) with the same name.

    opened by paroche 22
  • Chapter: Variable scope, closure,  modification suggestion

    Chapter: Variable scope, closure, modification suggestion

    There is an "Army of functions" exercise in this chapter. And I suggest some modifications for the explanation/solution.

    If I understand correctly, using let doesn't create a new Lexical Environment and it is the {} block clause creates a new Lexical Environment each time and let just creates a local variable inside the Lexical Environment, while var hoists the variable into the function level scope when creating a variable. So, whether using let or not, there is a new Lexical Environment created each run in for(){} or while{}.

    But for the first time I read the solution/explanation, I thought it was using let that creates a new Lexical Environment. Kinda misleading until I read some thing on MDN about let.

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let

    However, it's important to point out that a block nested inside a case clause will create a new block scoped lexical environment, which will not produce the redeclaration errors shown above.

    The quotes above did not direclty clear my doubt but made me thought twice. And then I got my coherent conclusion.


    Parts that made me mostly confused for the first time:

    Now it works correctly, because every time the code block in for (let i=0...) {...} is executed, a new Lexical Environment is created for it, with the corresponding variable i.

    The while loop, just like for, makes a new Lexical Environment for each run. So here we make sure that it gets the right value for a shooter.

    And becasue you are adding a new let or replacing var with let in each new code snippet. So I was more likey to believe that it was let that somehow creates a new Lexical Environment.

    To sum up, I suggest making some modification here and let the readers know let does not create a new Lexical Environment, while {} does.

    Anyway, it's just my opinion. (Or my conclusion could totally be wrong. I write C++ most of my times.)

    --

    In the end, I would like to thank you so much for the tutorial. It's so far the best I could find in the Net. So much better than the classic book I've read. I am going to buy a full tutorial.

    opened by ajfg93 21
  • Spanish Translation

    Spanish Translation

    Hello @iliakan! Time ago I contact you to start this project. Finally, I can get through this with some other people. This is the repository https://github.com/lizzie136/javacript-tutorial-es

    Can you include it in the list, I'll be updating it as soon as possible.

    Thanks!!

    Elizabeth

    opened by lizzie136 21
  • Discord or Telegram to discuss Course Work

    Discord or Telegram to discuss Course Work

    There may probably be one out there, but I think a Discord Server or Telegram Group would be a really nice addition to the course, not only would we be able to communicate with classmates and discuss solutions to the course, but then we would also be able to find study groups, I think it'll be a really useful addition.

    PS: I don't know if there's one, I never saw any mention of any, but if there is, I'll be more than willing to join in.

    help wanted tell your opinion 
    opened by htmlHxcker 20
  • redundant

    redundant "use case"

    WIP ? What's wrong with it? Something new?

    I just reviewed the translated article!!!! give us a break

    ok, just to report a redundancy, keep in mind in the new version.

    opened by joaquinelio 20
  • Update article.md

    Update article.md

    No changes intended by my own line 53 Dont know English. I should avoid the coma in Spanish. You mean: To avoid confusion: (example) or To avoid (ambiguity? should truncate? should leave bigint?) confusion, it's not supported on bigints:

    opened by joaquinelio 20
  • CSS-animation

    CSS-animation

    A few tweaks and improvements: line 3: more verbose language line 50: shorthand is a better description, also added in the same line for clarity line 89: grammar fix line 91: grammar fix line 144: added whereas for clarity line 161: minor tweak line 165: replaced that with this because it could make more sense lines 171,195,233: minor tweaks line 202: grammar fix line 225: replaced huge ones with huge values to be more specific line 251: minor tweak line 253: formatting: added spaces line 304: improvement suggestion: switch action at the beginning line 324: used the same language as in line 312 for consistency. line 347: considered that the two sentences belong together, making the idea be clearer line 441: improved flow line 444: formatting: removed space task 2: formatting: added spaces task 3: description suggestion

    opened by bogdanbacosca 0
  • Corrections in import-export

    Corrections in import-export

    Current: Modern build tools, such as webpack and others, bundle modules together and optimize them to speedup loading. They also removed unused imports. Expected: Modern build tools, such as webpack and others, bundle modules together and optimize them to speedup loading. They also remove unused imports.

    Current: For instance, if you import * as library from a huge code library, and then use only few methods, then unused ones will not be included into the optimzed bundle. Expected: For instance, if you import * as library from a huge code library, and then use only few methods, then unused ones will not be included into the optimized bundle.

    opened by biswa8998 0
  • CSRF Explanation

    CSRF Explanation

    Hello!

    Not sure if requests fit here, but would it possible to expand the explanations to explain what CSRF cookies are and how they work? There is an explanation on CORS so I would propose to have it next to one another.

    opened by txomon 0
  • Update commens in few code snippets

    Update commens in few code snippets

    In the Non-writable and Non-configurable section, the comments in a few of the code snippets says 'Error' but that is only the case when the 'strict' mode is enabled. I understand that it is also mentioned but it should be reflected in the code snippet as well so that the reader is absolutely clear about the concept.

    opened by Suyash-Purwar 1
Owner
The Modern JavaScript Tutorial
The Modern JavaScript Tutorial
The Modern JavaScript Tutorial
Github Repository for the resources shown in my 8 JavaScript Pro Tips Tutorial in Youtube

Part 1 - JavaScript Pro Tips - Learn with Sumit Table of Contents How to run Contact How to run Different lessons taught in the Youtube Tutorial are o

Learn with Sumit 28 Dec 28, 2022
An interactive Bitcoin tutorial for orange-pilled beginners. Illustrates technical Bitcoin concepts using JavaScript and some Bitcoin Core RPC commands. Programming experience is helpful, but not required.

Try Bitcoin Try Bitcoin is an interactive Bitcoin tutorial inspired by and forked from Try Regex, which is inspired by Try Ruby and Try Haskell. It il

Stacie Waleyko 33 Nov 25, 2022
This repo is accompanying a tutorial that is meant to be a simple introduction to vector search JavaScript engineers who use MongoDB Atlas.

hello-vector-search A simple JavaScript program to run from your computer to vectorize the sample_mflix.movies collection: vectorize_collection.js. A

Marcus 7 Oct 23, 2022
An interactive git visualization and tutorial. Aspiring students of git can use this app to educate and challenge themselves towards mastery of git!

LearnGitBranching LearnGitBranching is a git repository visualizer, sandbox, and a series of educational tutorials and challenges. Its primary purpose

Peter Cottle 26.4k Jan 3, 2023
The code base for the tutorial on how to use the TypingDNA Verify API

TypingDNA-Verify-API-Tutorial The code base for the tutorial on how to use the TypingDNA Verify API Resources TypingDNA Website TypingDNA Verify Docs

Tim Ruscica 21 Oct 6, 2022
This Repository consist of Daily learning JS, Assignments, coding challenge, projects, references, tutorial

?? A Tour of JavaScript This Repository consist of Daily learning, Assignments, coding challenge, projects, references, tutorial. ??‍?? ??‍?? alert(

null 23 Sep 7, 2022
Youtube Tutorial Project for creating a developer portfolio website.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev

codingwithdidem 14 Nov 29, 2022
Tutorial building UI5 applications with TypeScript.

ui5-typescript-tutorial - Learn App Development in UI5 and TypeScript Overview This brief (~1-2-hours) tutorial introduces developers to UI5 applicati

SAP Samples 30 Nov 21, 2022
GitHub Actions Tutorial

GitHub Actions Tutorial This is a brief intro of how to use GitHub Actions for a frontend (static S3) and a backend (lambda). If you want to learn mor

Rodrigo Medina 3 Mar 4, 2022
A solidity tutorial repo.

Advanced Sample Hardhat Project This project demonstrates an advanced Hardhat use case, integrating other tools commonly used alongside Hardhat in the

Yadav! ✔ 3 Apr 13, 2022
A prototype snap for injecting gas fee prices into a confirmation window that also serves as the basis for a 5-minute Snaps tutorial

@Montoya/gas-fee-snap A simple Snap example based on @MetaMask/template-snap. Read below for a tutorial! Prerequisites Before you begin, make sure you

Christian Montoya 18 Dec 8, 2022
Full source-code for the step-by-step tutorial on how to use Phaser + Colyseus together.

Phaser: Real-time Multiplayer with Colyseus Full source-code for the step-by-step tutorial on how to use Phaser + Colyseus together. Live Demo See ste

Colyseus 19 Dec 24, 2022
A quick ERC-20 tutorial with testing, fuzzing and more.

ERC-20-tutorial A quick ERC-20 tutorial with testing, fuzzing and more. Our Approach This tutorial will help you learn web3 with three principles in m

Anthony Albertorio 4 Jul 5, 2022
To-Do List Tutorial

Dev Environment Set Up In order to propertly work with this repo you will need the following installed on your computer: Node, Git, Create React App I

null 11 Aug 30, 2022
Trying to learn Svelte. Based off the official tutorial. Readme has notes!

Learning Svelte! A JavaScript library An open-source front end compiler Instead of using a virtual DOM, Svelte will directly update the DOM in an effi

Areena Arora 2 Jul 5, 2022
Web-Technology with Aj Zero Coding. In this tutorial we learn front-end and back-end development.

Installation through NPM: The jQWidgets framework is available as NPM package: jQuery, Javascript, Angular, Vue, React, Web Components: https://www

Ajay Dhangar 3 Nov 19, 2022
A tutorial for people that want to learn continuous delivery concepts by practicing.

Continuous delivery playground This tutorial walks you through setting up a continuous delivery pipeline from scratch. This guide is for people that w

Pablo Porto 7 Nov 24, 2022
A complete application tutorial to show how to implement the Web Socket protocol using only Node.js builtin modules

Web Socket application using only Node.js built-in modules About Welcome, this repo is part of my youtube video about Building a complete application

Erick Wendel 35 Dec 19, 2022
👽 This is a tutorial for integrating Casbin and Passport.

passport-combine-casbin but not only casbin passport-combine-casbin-react:前端应用(vite + react 17): 跳转链接 技术选型 基础:Midway.js ✅ ORM: prisma ✅ DB: mongoDB(需要

xiaoqinvar 6 Nov 22, 2022