fix/add-suggested-grammar-and-punctuation

This commit is contained in:
moT01
2019-07-08 20:03:01 -05:00
committed by Kristofer Koishigawa
parent d3cf6f42dd
commit 9ce8bbb4c0
2 changed files with 3 additions and 3 deletions

View File

@ -10,14 +10,14 @@ A promise has three states: <code>pending</code>, <code>fulfilled</code>, and <c
```js
const myPromise = new Promise((resolve, reject) => {
if(true) {
if(condition here) {
resolve("Promise was fulfilled");
} else {
reject("Promise was rejected");
}
```
The example above uses strings for the argument of these functions, but it can really be anything. Often, it might be an object that you would use data from to put on your website or elsewhere.
The example above uses strings for the argument of these functions, but it can really be anything. Often, it might be an object, that you would use data from, to put on your website or elsewhere.
</section>
## Instructions

View File

@ -6,7 +6,7 @@ challengeType: 1
## Description
<section id='description'>
A promise in JavaScript is exactly what it sounds like. You use it to make a promise to do something, usually asynchronously. When the task completes, you either fulfill your promise or fail to do so. <code>Promise</code> is a constructor function, so you need to use the <code>new</code> keyword to create one. It takes a function as its argument with two parameters: <code>resolve</code> and <code>reject</code>. These are methods used to determine the outcome of the promise. The syntax looks like this:
A promise in JavaScript is exactly what it sounds like - you use it to make a promise to do something, usually asynchronously. When the task completes, you either fulfill your promise or fail to do so. <code>Promise</code> is a constructor function, so you need to use the <code>new</code> keyword to create one. It takes a function, as its argument, with two parameters - <code>resolve</code> and <code>reject</code>. These are methods used to determine the outcome of the promise. The syntax looks like this:
```js
const myPromise = new Promise((resolve, reject) => {