Javascript Flashcards
callback function
A function that pass in another function as argument.
A callback function is created in order to be executed at a later point in time.
(often in event)
function
a block of code designed to perform a particular task
how many way to define function ?
6: function decoration function name() function expression const name = function () {} shorthand const name = {} => defined using object arrow function
return vs console.log
return is to return a actual value
console.log: to print some information to the console
scope
defines visibility and accessibility of our variables
way to access object value
bracket notation
dot notation
object
Objects are incredibly useful for storing paired and grouped data in JavaScript
array
you wanted to make a list of values where the order mattered
API
Application programming interface,
refer to a set of instructions and protocols of communication that facilitate communication between a client and a server
REST API
api organization principles used by many developer (representational state transfer)
Communicate with API
HTTP: hypertext transfer protocol, tell api what we want to do, get, post, put, delete
AJAX
AJAX (Asynchronous JavaScript and XML) because it allows us to send and receive data asynchronously
fetch
requesting data from as a single argument to the fetch() method