Rippling frontend engineer interviews emphasise JavaScript, DOM manipulation, CSS, accessibility, browser APIs, and UI component architecture.
VDOMDiffer that compares two virtual DOM trees and returns the changes necessary to update the real DOM. It should have the following method:diff(oldTree: VNode, newTree: VNode): Array<Change> - Compare the old and new trees and return an array of changes, where each change is an object containing the type and the data needed to apply the change.const oldTree = { tag: 'div', children: [] }; const newTree = { tag: 'div', children: [{ tag: 'span', children: [] }] }; diff(oldTree, newTree); const oldTree = { tag: 'h1', children: [] }; const newTree = { tag: 'h1', children: [{ tag: 'strong', children: [] }] }; diff(oldTree, newTree); tag and children array.Router that allows registering routes and navigating between them. It should have the following methods:register(route: string, view: Function): void - Register a new route with its corresponding view.navigate(route: string): void - Navigate to a new route and render the corresponding view.getCurrentRoute(): string - Return the current route.const router = new Router(); router.register('/home', () => console.log('Home view')); router.navigate('/home'); router.register('/about', () => console.log('About view')); router.navigate('/about'); Logs 'About view'.Sign up for free to access walkthroughs, AI-generated questions, and more.
Get Started Free