Skip to content

Commit

Permalink
ES6/Async/JS CS Intro: Improve links description (#28001)
Browse files Browse the repository at this point in the history
* Provided a more descriptive link.

* Provided a more descriptive link.
  • Loading branch information
EdMagal committed May 18, 2024
1 parent 9289521 commit 347e6f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This section contains a general overview of topics that you will learn in this l

In the recent past, the way that these were most commonly handled were with **callbacks**, and even now they are still used quite a lot in certain circumstances.

> A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action. [MDN](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function)
A callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action ([MDN documentation on callback functions](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function)).

Callbacks are functions that get passed into other functions. For example:

Expand All @@ -29,7 +29,7 @@ Here, the function `addEventListener()` takes a callback (the "do something" fun

You will likely recognize this pattern as something that happens *all the time* in JavaScript code. Unfortunately, though they are useful in situations like the above example, using callbacks can get out of hand, especially when you need to chain several of them together in a specific order. The rest of this lesson discusses patterns and functions that will help keep you out of [Callback hell](http://callbackhell.com/).

Take a moment to skim through this [Callback article](https://github.com/maxogden/art-of-node#callbacks) before moving on. Or, if you prefer to watch a video of [Callback functions](https://www.youtube.com/watch?v=QRq2zMHlBz4).
Take a moment to skim through this [article on callbacks](https://github.com/maxogden/art-of-node#callbacks) before moving on. Or, if you prefer to watch a video of [Callback functions](https://www.youtube.com/watch?v=QRq2zMHlBz4).

### Promises

Expand Down
4 changes: 3 additions & 1 deletion javascript/computer_science/a_very_brief_intro_to_cs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ This section contains a general overview of topics that you will learn in this l
### Assignment

<div class="lesson-content__panel" markdown="1">

1. Watch [Introduction to Algorithms by David Malan](https://www.youtube.com/watch?v=6hfOvs8pY1k) on TedEd to see how to think about algorithms.
2. Watch [What is an Algorithm?](https://youtu.be/e_WfC8HwVB8) on YouTube for a more structured look at solving problems using algorithms.
3. Read [this Quora answer about the importance of algorithms in web development](https://qr.ae/py3NAc) to get some context for why we're going over this stuff.
3. Read this Quora answer about the [importance of algorithms in web development](https://qr.ae/py3NAc) to get some context for why we're going over this stuff.
4. Watch [What is pseudocode?](https://www.youtube.com/watch?v=Rg-fO7rDsds)

</div>

### Knowledge check
Expand Down
8 changes: 4 additions & 4 deletions javascript/javascript_in_the_real_world/what_is_es6.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ ES6 is a version of JavaScript that was officially released in the summer of 201

You have probably also come across articles talking about features in ES7 or ES8 or ES2015 or ES2017 etc. Part of the confusion here is that right after the release of ES6, the committee that makes these decisions changed the naming scheme from 'version numbers' (ES5, ES6, ES7 etc.) to 'release years' (ES2015, ES2016, ES2017 etc.)

- [This article](https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c) provides a nice clean explanation and timeline of the various ECMAScript releases.
- [This document](https://github.com/lukehoban/es6features) outlines all the new features that showed up in ES6. As we've mentioned you've already been using many of these, though there are a few we haven't specifically covered yet.
- The following article provides a nice [timeline of the various ECMAScript releases](https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c).
- Read about all the [new features that showed up in ES6 (a.k.a. ES2015)](https://github.com/lukehoban/es6features). You've already been using many of these, although there are a few we haven't specifically covered yet.

The _problem_ with JavaScript constantly updating and adding features is that it sometimes takes web-browsers a while to catch up and implement new features once they've been released. At the current time all modern browsers (Chrome, Firefox, Safari and Edge) support _all_ of ES6, and _most_ of ES7, but older browsers (various versions of Internet Explorer for instance) do not. This means, unfortunately, that if you write code that uses these new features it __will not run__ in browsers that do not support it.

Expand All @@ -17,8 +17,8 @@ Fortunately there _is_ a solution to this problem. [Babel](http://babeljs.io/) i

In all honesty, this is not something that you are going to _need_ to worry about on every project you're starting. All the ES6 features are present in the large majority of browsers used worldwide. But JavaScript is constantly changing, and as new features are announced and released, you can use Babel to try them out, often before they're available in _any_ browser!

- Follow the instructions [here](https://github.com/babel/babel-loader) to install the babel-loader and use it with webpack. If you've already got webpack up and running in a project, adding babel is a cinch!
- Read [this article](https://blog.jakoblind.no/babel-preset-env/) to better understand presets and plugins in Babel. It will also show you how to target specific browser versions you want to support.
- Here are some instructions for [installing `babel-loader` for use with webpack](https://github.com/babel/babel-loader) if you wanted to try it out. If you've already got webpack up and running in a project, adding babel is a cinch!
- Read about [presets and plugins in Babel](https://blog.jakoblind.no/babel-preset-env/). It will also show you how to target specific browser versions you want to support.

### Additional resources

Expand Down

0 comments on commit 347e6f3

Please sign in to comment.