JavaScript-methods Flashcards
Why do we log things to the console?
it is to debugging the code
What is a method?
is a function which is a property of an object
How is a method different from any other function?
method is attch to a object
How do you remove the last element from an array?
array.pop()
How do you round a number down to the nearest integer?
math.floor()
How do you generate a random number?
math.random()
How do you delete an element from an array?
array.splice()
How do you append an element to an array?
array.push()
How do you break a string up into an array?
array.split()
Do string methods change the original string? How would you check if you weren’t sure?
no, you could check console log
Is the return value of a function or method useful in every situation?
no
What three-letter acronym should you always include in your Google search about a JavaScript method or CSS property?
NDN