run-editor-intellisense-js.txt 452 B

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. function Person(age) {
  3. if (age) {
  4. this.age = age;
  5. }
  6. }
  7. Person.prototype.getAge = function () {
  8. return this.age;
  9. };
  10. function Student(age, grade) {
  11. Person.call(this, age);
  12. this.grade = grade;
  13. }
  14. Student.prototype = new Person();
  15. Student.prototype.getGrade = function () {
  16. return this.grade;
  17. };
  18. var s = new Student(24, 5.75);
  19. //var age = s.
  20. //delete s.age;
  21. //s.getAge = function() { return {foo:"bar"}; };
  22. //s.
  23. //s.getAge().