OnSite Interview - Meta

Frontend Engineer - Meta - L5

Meta - Frontend Engineer - Onsite

Description:
Level: L5
Education: Bachelors
Years of Experience: 10
Questions Asked:
Q1. Implement a createDom method which takes a JSON object as input. Eg JSON:
{
tagName: ‘button’,
attrs: {
id: ‘btn’,
class: ‘save-btn’
},
children: [
‘save’,
{
tagName: ‘b’,
attrs: {
id: ‘btn’,
class: ‘save-btn’
},
children: [‘Bold’]
}
]
}
Q2. Prepare a setTimeout and clearTimeout and clearAllTimeouts . Should be global and have a garbage collection system for all running timeouts on demand.