Skip to content

Commit

Permalink
New and updated Javascript questions (#2289)
Browse files Browse the repository at this point in the history
* javascript Q33 code update

There was a missing line in the code.

* New Javascript question (#92)

Which statement is applicable to the defer attribute af the HTML <script> tag?
  • Loading branch information
nicholas-cod3r committed Sep 26, 2021
1 parent 480a582 commit 57309da
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions javascript/javascript-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ class X {
return 42;
}
}
var x = new X();
```
- [ ] x.get('Y')
Expand Down Expand Up @@ -1032,3 +1033,12 @@ new logThis();
- [ ] undefined
- [ ] function
- [x] {desc: "logger"}
#### Q92. Which statement is applicable to the defer attribute af the HTML <script> tag?
- [ ] defer causes the script ta be loaded from the backup content delivery network (CDN).
- [x] defer allows the browser ta continue processing the page while the script loads in the background.
- [ ] defer blacks the browser from processing HTML below the tag until the script is completely loaded.
- [ ] defer lazy loads the script, causing it to download only when it is called by another script on the page.
**Explanation:** If the defer attribute is set, it specifies that the script is downloaded in parallel to parsing the page, and executed after the page has finished parsing. [HTML <script> defer Attribute](https://www.w3schools.com/tags/att_script_defer.asp)

0 comments on commit 57309da

Please sign in to comment.