-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevel2.txt
More file actions
77 lines (37 loc) · 2.36 KB
/
level2.txt
File metadata and controls
77 lines (37 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
1. What is the DOM?
Answer: DOM = "Document Object Model".
As the html page is loaded a web page page consists og head, body, etc these
is what we refer to when we say "DOM" as these can be manipulated by the developer.
Source: https://www.w3.org/DOM/
https://www.w3schools.com/js/js_htmldom.asp
2. List three methods to manipulate the DOM.
Answer: (1) - document.getelmentbyid
(2) - document.getelmentbytagname
(3) - document.getelmentbyclassname
source: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Manipulating_documents
https://www.w3.org/TR/DOM-Level-1/introduction.html
https://www.w3schools.com/js/js_htmldom_document.asp
3. What is an asynchronous call?
Answer: When our code is running in javascript it will run trough the code as it is writen.
In a asynchronous call section of our code will wait to be executed in a spesific time.
Source: https://medium.freecodecamp.org/javascript-from-callbacks-to-async-await-1cc090ddad99
4. Briefly explain what the sources tab in Chromes Developers Tools does.
Answer: When we press CTRL+I and select the "Source" tab we can see a tree structure of the site or doc we are
visting and we see here the source of the site.
5. What is a JavaScript promise?
Answer: Promise is code that "maybe" will produce a value somewhere in the future that can produce a action.
It can be of "fullfilled","Rejected", or "pending".
Source: https://scotch.io/tutorials/javascript-promises-for-dummies <--- (please read this :) )
https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-promise-27fc71e77261
6. What is an API?
Answer: API Or Apllication Program Interface.
We use API to get data from another source, lets say we build a weather app
then we can use a api from a weather service so we can deliver weather
stat in our app or site.
7. What is a JavaScript Event?
Answer: Event is something that will happen in our code it can be a click-event so a action
that will take place after a user have clicked a button.
Source: https://developer.mozilla.org/en-US/docs/Web/Events
8. What is event bubbling?
Answer: It describs when the event is called in our code.
Source: https://www.sitepoint.com/event-bubbling-javascript/