MWR InfoSecurity interview question

How would you create a JS framework?