From da2645182082c84990d5afa33171212747657dae Mon Sep 17 00:00:00 2001 From: pansay Date: Sun, 17 Apr 2016 10:11:17 +0200 Subject: [PATCH 1/2] Update simple.md --- manuscript/markdown/Instances and Classes/simple.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manuscript/markdown/Instances and Classes/simple.md b/manuscript/markdown/Instances and Classes/simple.md index 0e91d47..b78e290 100644 --- a/manuscript/markdown/Instances and Classes/simple.md +++ b/manuscript/markdown/Instances and Classes/simple.md @@ -136,9 +136,9 @@ For example: 'FORTRAN, SNOBOL, LISP, BASIC'.split(', ') //=> [ 'FORTRAN', - # 'SNOBOL', - # 'LISP', - # 'BASIC' ] + // 'SNOBOL', + // 'LISP', + // 'BASIC' ] [ 'FORTRAN', 'SNOBOL', @@ -146,7 +146,7 @@ For example: 'BASIC' ].length //=> 4 -Functions themselves are instances, and they have methods. For example, every function has a method `call`. `call`'s first argument is a *context*: When you invoke `.call` on a function, it invoked the function, setting `this` to the context. It passes the remainder of the arguments to the function. It seems like objects are everywhere in JavaScript! +Functions themselves are instances, and they have methods. For example, every function has a method `call`. `call`'s first argument is a *context*: When you invoke `.call` on a function, it invokes the function, setting `this` to the context. It passes the remainder of the arguments to the function. It seems like objects are everywhere in JavaScript! ### impostors From e1b023b4fdb7e8b353e76a3fb69585e9e84615f8 Mon Sep 17 00:00:00 2001 From: pansay Date: Sun, 17 Apr 2016 10:23:55 +0200 Subject: [PATCH 2/2] Update simple.md --- manuscript/markdown/Instances and Classes/simple.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manuscript/markdown/Instances and Classes/simple.md b/manuscript/markdown/Instances and Classes/simple.md index b78e290..d459698 100644 --- a/manuscript/markdown/Instances and Classes/simple.md +++ b/manuscript/markdown/Instances and Classes/simple.md @@ -150,7 +150,7 @@ Functions themselves are instances, and they have methods. For example, every fu ### impostors -You may have noticed that we use "weasel words" to describe how everything in JavaScript *behaves like* an instance. Everything *behaves as if* it was created by a function with a prototype. +You may have noticed that we use "weasel words" to describe how everything in JavaScript *behaves like* an instance. Everything *behaves as if* it were created by a function with a prototype. The full explanation is this: As you know, JavaScript has "value types" like `String`, `Number`, and `Boolean`. As noted in the first chapter, value types are also called *primitives*, and one consequence of the way JavaScript implements primitives is that they aren't objects. Which means they can be identical to other values of the same type with the same contents, but the consequence of certain design decisions is that value types don't actually have methods or constructors. They aren't instances of some constructor.