Web Flashcards
What is a framework?
A framework is a tool that provides ready-made components or solutions that are customized in order to speed up development.
What is primitive?
A data type that isn’t an object, and doesn’t have methods. Ex (strings, booleans, numbers)
What is hoisting?
When a function is able to be used before it is declared.
What is the difference between regular and arrow functions?
Regular functions can be used as constructors, and can be called using the new keyword, while arrow functions can’t.
How does the map function work?
It loops over every item and executes a function on each item.
How is JavaScript a loosely/dynamic typed language?
You don’t have to declare what type of data you are working with.
Ex. passing a number as an int in a function parameter. Javascript is a dynamic-typed language.
What is a prototype?
It allows us to use methods and properties on an object even if they don’t exist on the current object.
What is bind in javascript?
Borrows a function, creates a copy of that function. “this” keyword is replaced with the object passed in as an argument
How do you handle accessibility?
The biggest thing is using semantic html. So using heading tags where necessary, using the designated elements for aside, nav, and footer.
Making sure forms are labeled clearly.
Making sure pictures have an alt tag so users who might not be able to see clearly or at all can know that there is a picture and what it is.
For videos and songs don’t have them on autoplay. Allow for them to be keyboard accessible and have options for captions.”
What is MVC?
Model-View-Controller
Design pattern to separate the concerns of an application.
It helps in organizing code and making it more maintainable, scalable, and modular.
What does the Model do?
The Model represents the application’s data and business logic. It encapsulates the data and provides methods to manipulate and interact with it.
What does the View do?
The View is responsible for presenting the data to the user and handling the user interface elements. It displays the information from the Model to the user and can also include elements like buttons, input fields, and other UI components.
What does the Controller do?
The Controller acts as an intermediary between the Model and the View. It receives user input from the View and processes it, often modifying the Model’s data and updating the View accordingly. The Controller ensures that the user’s actions trigger appropriate responses within the application.