Interview Question

Front End Engineer Interview

-Tel Aviv-Yafo


For a recursive description of DOM elements i.e. var dom = { type:'div', props:{id:'hello', children:[{type:'h1', children:'HELLO'}]}}. Define a function that prepares a actual dom elements.

AnswerAdd Tags

Interview Answer

1 Answer


recursive document.createElement with assing all the attributes and children.

Anonymous on

Add Answers or Comments

To comment on this, Sign In or Sign Up.