URL parameters Flashcards
1
Q
How do you add a parameter to a URL?
A
URL/endpoint/:parameter_name
2
Q
How do you access the value in a parameter?
A
req.params.parameter_name
3
Q
How do you make a parameter optional?
A
URL/endpoint/:parameter_name?
4
Q
How do you use Vanilla JS to find an element in an array?
A
array.find((el) => el === key);