Js 支持两种基本概念
对象
函数
For character access using bracket notation, attempting to delete or assign a value to these properties will not succeed. The properties involved are neither writable nor configurable. (See Object.defineProperty() for more information.)
这段话表明,string 对象内部存入的是一个字面量
String literals (denoted by double or single quotes) and strings returned from String calls in a non-constructor context (i.e., without using the new keyword) are primitive strings. JavaScript automatically converts primitives to String objects, so that it's possible to use String object methods for primitive strings. In contexts where a method is to be invoked on a primitive string or a property lookup occurs, JavaScript will automatically wrap the string primitive and call the method or perform the property lookup.
字符串字面量和字符串对象是不同的,可以使用eval 函数测试一下
fruits.forEach(function(item, index, array) {
console.log(item, index);
});
这段代码表明方法内部有个回调函数,该函数的原型如调用参数