[[Prototype]]机制 [[Prototype]]是对象内部的隐试属性,指向一个内部的链接,这个链接的作用是:如果在对象上没有找到需要的属性或者方法引用,引擎就 会继续在 [[Prototype]] 关联的对象上进行查找.同理,如果在后者中也没有找到需要的 引用就会继续查找它的 [[Prototype]],以此类推.这一系列对象的链接被称为“原型链”. function Foo() { // ... } var a = new Foo(); Object.getPrototypeOf(…
实体对象类 --略 排序类----实现Comparator接口,重写compare方法 package com.tang.list; import java.util.Comparator; public class Mycompera implements Comparator<Student> { @Override public int compare(Student o1, Student o2) { if (o1.getSid() > o2.getSid()…
javascript 中 arguments.callee属性 可以在函数内部,指向的是这个函数(或者叫做“类”)本身. 相当于PHP 中的 self 关键字. The arguments.callee property contains the currently executing function. Description callee is a property of the arguments object. It can be used to refer to the current…