Skip to content

Commit

Permalink
Update JavaScript Quiz (Ebazhanov#305)
Browse files Browse the repository at this point in the history
* add new javascript quiz - throw

* add new javascript quiz - defer attribute

* add new javascript quiz - ternary
  • Loading branch information
flyingSquirrel-dev authored Aug 19, 2020
1 parent 547d469 commit 7abb4e0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions javascript/javascript-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,28 @@ undefined
TRUE
Two <<<<----Correct


### Q48. Which keyword is used to create an error?
- throw <<<<----Correct
- exception
- catch
- error


### Q49. What's one difference between the async and defer attributes of the HTML script tag?
- The defer attribute can work synchronously.
- The defer attribute works only with generators.
- The defer attribute works only with promises.
- The defer attribute will asynchronously load the scripts in order. <<<<----Correct


### Q50. The following program has a problem. What is it?
```
var a;
var b = (a = 3) ? true: false
```
- The condition in the ternary is using the assignment operator. <<<<----Correct
- You can't define a variable without initializing it.
- You can't use a ternary in the right-hand side of an assignment operator.
- The code is using the deprecated var keyword

0 comments on commit 7abb4e0

Please sign in to comment.