marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
2.99k stars 790 forks source link

Help understanding a sentence in ch. 10 #551

Closed B-bit-maker closed 3 years ago

B-bit-maker commented 3 years ago

I'm having difficulties understanding this sentence at page 175:

You can use JavaScript functions to create local scopes and objects to represent module interfaces.

Which one is the correct way to understand this sentence? 1) You can use JavaScript functions to create local scopes and (you can use) objects to represent module interfaces. 2) You can use JavaScript functions to create (both) local scopes and objects(, in order) to represent module interfaces.

I guess it's the first one, but to be sure I thought I'd ask you. Thanks (for your answer and for the book).

marijnh commented 3 years ago

The first one is indeed the intended interpretation!