-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Front-End Interview #47
Comments
10 Interview Questions Every JavaScript Developer Should Know – JavaScript Scene – Medium Programming Paradigms in JavaScript
Functional ProgrammingFunctional programming produces programs by composing mathematical functions and avoids shared states and mutable data.
Classical Inheritance and Prototypal InheritanceClass Inheritance: instances inherit from classes (like a blueprint - a description of the class), and create sub-class relationships. Instances are instantiated via constructor functions with the Prototypal Inheritance: instances inherit directly from other objects. Instances are typically instantiated via factory functions or Functional Programming vs Object Oriented ProgrammingOOPPros
Cons
FPPros
Cons
Prototypal Inheritance
"favor object composition over class inheritance"It means that code reuse should be achieved by assembling smaller units of functionality into new objects instead of inheriting from classes and creating object taxonomies. In other words, use can-do, has-a, or uses-a relationships instead of is-a relationships. Two-way Data Binding vs One-way Data FlowTwo-way data binding - UI fields are bound to model data dynamically such that when a UI field changes the model data changes with it and vice-versa. One-way data flow - The model is the single source of truth. Changes in the UI trigger messages that signal user intent to the model. Only the model has the access to change the app's state. The data always flows in a single direction, which makes it easier to understand. Monolithic vs Microservice ArchitectureMonolithic architectureThe app is written as on cohesive unit of code whose components are designed to work together, sharing the same memory space and resources. Pros
Cons
Microservice architectureThe app is made up of lots of smaller, independent applications capable of running in their own memory space and scaling independently from each other across many separate machines. Pros
Cons
Asynchronous ProgrammingAsynchronous programming means that the engine runs in an event loop. When a blocking operation is needed, the request is started, and the code keeps running. When the response is ready, an interrupt is fired, which causes an event handler to be run. In this way, a single thread can handle many concurrent operations. |
Pure FunctionPromise is not a pure function because it is eager to run. But we can wrap a function to return a function that returns the Promise object. This function is pure. const getInfo = name => () => jQuery.get(`https://www.example.com/${name}`);
const fetch = getInfo('foo'); // this function is pure
fetch() // t his function is not pure
.then(id => console.log(id))
.catch(handleErrors); |
Cracking the front-end interview – freeCodeCamp Front-end conceptsHTML and CSS
JavaScript Concepts
Design Patterns
Computer science conceptsData Structures
Sorting
|
Front-End interview questions · Front-End Developer Handbook 2018
Twipped/InterviewThis: An open source list of developer questions to ask prospective employers
The text was updated successfully, but these errors were encountered: