URL parameters Flashcards

1
Q

How do you add a parameter to a URL?

A

URL/endpoint/:parameter_name

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

How do you access the value in a parameter?

A

req.params.parameter_name

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

How do you make a parameter optional?

A

URL/endpoint/:parameter_name?

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

How do you use Vanilla JS to find an element in an array?

A

array.find((el) => el === key);

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