JavaScript inheritance methods