SAP interview question

How does inheritance works in javascript