JS Flashcards

1
Q

Hur länkar jag till js-dokumentet i html-dokumentet.

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

Vilka datatyper finns?

A

String, number, boolean, undefined, null

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

forEach()

A

Calls a function for each array element

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

pop()

A

Removes the last element of an array, and returns that element.
Tar bort det sista elementet från en array och returnerar det elementet.

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

push()

A

Adds new elements to the end of an array, and returns the new length.
Lägger till element i slutet av en array och returnerar den nya längden på arrayen.

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

Array-metod: shift()

A

Removes the first element of an array, and returns that element.
Tar bort det första elementet från en array och returnerar det elementet.

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

Array-metod: unshift()

A

Adds new elements to the beginning of an array, and returns the new length.
Lägger till nya element i början av en array och returnerar den nya längden på arrayen.

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

find()

A

Returns the value of the first element in an array that pass a test
Returnerar värdet av det första elementet i en array som stämmer.

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