React Flashcards

1
Q

Babel

A

transpolar that converts modern js into a version that the browser understands

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

Transpiler

A

tool that is used to convert source code into another source code that is of the same level

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

== vs ===

A

== converts type for comparison, === compares value and type

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

Syntax for mapping out an array of string

A

Array.map((text) => ( <p>{text}</p>))

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

Use effect syntax

A

UseEffect(() => {

}, [prop])

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

<i> tag vs <em> tag</em></i>

A

The <i> and <em> tags are both used for emphasizing text in HTML, but they have slightly different meanings and use cases:

  1. <i> tag (Italic):
    • The <i> tag is primarily used for formatting purposes, such as making text italicized. It doesn’t inherently convey any specific semantic meaning.
    • It’s commonly used when you want to stylistically change the appearance of text without implying any particular emphasis on the content itself.
    • Example: <p>This is <i>italicized</i> text.</p>
  2. <em> tag (Emphasis):
    • The <em> tag is used to indicate text that should be emphasized for its meaning. It carries semantic significance and is typically rendered in italics by default, although this can vary based on CSS.
    • It’s used when you want to convey that a particular word or phrase should be given importance or emphasis within the context of the content.
    • Example: <p>It's important to <em>always</em> save your work before closing the application.</p>

In general, it’s recommended to use the <em> tag when you want to emphasize text for its meaning within the content, and use the <i> tag when you want to apply italic formatting purely for stylistic reasons. HTML5 encourages the use of <em> for semantic emphasis, as it provides a clearer indication of the content’s intent. However, the choice may also depend on your specific styling requirements and the overall design of your web page.

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