ES6 字符串原型属性 prototype ES6 字符串长度属性 ES6 字符串String 方法 charAt() ES6 字符串原型属性 prototype function employee(id, name) { this.id = id; this.name = name; } var emp = new employee(123, "Smith"); employee.prototype.email = "smith@abc.com"; console.log("Employee 's Id: " + emp.id); console.log("Employee's name: " + emp.name); console.log("Employee's Email ID: " + emp.email); ES6 字符串长度属性 ES6 字符串String 方法 charAt()