Home >Web Front-end >JS Tutorial >Two ways to add attributes to the object prototype in JavaScript_js object-oriented

Two ways to add attributes to the object prototype in JavaScript_js object-oriented

WBOY
WBOYOriginal
2016-05-16 18:22:101014browse
Copy code The code is as follows:



Run results:

hobby
study
================== ==
age
getSuper
name
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn