inheritance of js