javascript-method Flashcards
Why do we log things to the console?
visualize and see what data we are working
What is a method?
function as a property of an object
How is a method different from any other function?
property of an object rather than function by itself
How do you remove the last element from an array?
pop method
How do you round a number down to the nearest integer?
round method of math object
How do you generate a random number?
random method of math object
How do you delete an element from an array?
splice method
How do you append an element to an array?
push method
How do you break a string up into an array?
split method
Do string methods change the original string? How would you check if you weren’t sure?
stings are immutable, no it does not change itself
Roughly how many string methods are there according to the MDN Web docs?
around 50
Is the return value of a function or method useful in every situation?
no for example pop method, you don’t need to return it
Roughly how many array methods are there according to the MDN Web docs?
abut 40-50
What three-letter acronym should you always include in your Google search about a JavaScript method or CSS property?
MDN