From JavaScript to React Flashcards

1
Q

The DOM is an ……………………. representation of the HTML elements.

A

object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It acts as a bridge between your code and the …………………., and has a ………………………… structure with parent and child relationships.

A

user interface, tree-like

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You can use DOM ……………………. and a …………………………………….., such as JavaScript, to listen to user events and manipulate the DOM by ….(1),….(2)….(3)……(4)…. specific elements in the user interface.

A

methods, programming language, (1)selecting, (2)adding, (3)updating, and (4)deleting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

DOM manipulation allows you to not only target specific elements, but also change their……………. and …………..

A

style, content

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The DOM of the page is different from the ……..(1)…………. - or in other words, the original HTML file you created. This is because the HTML represents the …..(2)…… page content, whereas the DOM represents the …..(3)……….. page content which was changed by the JavaScript code.

A

source code, initial, updated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Specify the appropriate method :

1.A method that retrieves an HTML element from the document using its unique identifier (ID).
2.A method that creates a new text node in the document.
3.A method that creates a new HTML element in the document.
4.A method that appends a child element to a parent element in the document’s DOM tree.

A

1.getElementById()
2.createTextNode()
3.createElement()
4.appendChild()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

react is the …………… React library. react-dom provides………………methods that enable you to use React with the DOM.

A

core, DOM-specific

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

JSX is a ………………………….. for JavaScript that allows you to describe your UI in a familiar HTML-like syntax. Note that browsers don’t understand JSX out of the box, so you’ll need a JavaScript compiler, such as a …………………………., to transform your JSX code into regular JavaScript.

A

syntax extension, Babel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly