好书推荐 好书速递 排行榜 读书文摘

Principles of Object-Oriented JavaScript

Principles of Object-Oriented JavaScript
作者:[美国] 尼古拉斯·泽卡斯
出版社:No Starch Press
出版年:2014-02
ISBN:9781593275402
行业:计算机
浏览数:6

内容简介

If you've used a more traditional object-oriented language, such as C++ or Java, JavaScript probably doesn't seem object-oriented at all. It has no concept of classes, and you don't even need to define any objects in order to write code. But don't be fooled—JavaScript is an incredibly powerful and expressive object-oriented language that puts many design decisions right into your hands.

In The Principles of Object-Oriented JavaScript, Nicholas C. Zakas thoroughly explores JavaScript's object-oriented nature, revealing the language's unique implementation of inheritance and other key characteristics. You'll learn:

The difference between primitive and reference values

What makes JavaScript functions so unique

The various ways to create objects

How to define your own constructors

How to work with and understand prototypes

Inheritance patterns for types and objects

The Principles of Object-Oriented JavaScript will leave even experienced developers with a deeper understanding of JavaScript. Unlock the secrets behind how objects work in JavaScript so you can write clearer, more flexible, and more efficient code.

......(更多)

作者简介

Nicholas C. Zakas is a software engineer at Box and is known for writing on and speaking about the latest in JavaScript best practices. He honed his experience during his five years at Yahoo!, where he was principal frontend engineer for the Yahoo! home page. He is the author of several books, including Maintainable JavaScript (O’Reilly Media, 2012) and Professional JavaScript for Web Developers (Wrox, 2012).

......(更多)

目录

Foreword by Cody Lindley

Acknowledgments

Introduction

Chapter 1: Primitive and Reference Types

Chapter 2: Functions

Chapter 3: Understanding Objects

Chapter 4: Constructors and Prototypes

Chapter 5: Inheritance

Chapter 6: Object Patterns

Index

......(更多)

读书文摘

for in 会循环遍历所有属性 Object.keys()只返回可枚举的自有属性

in 操作符会检查自有属性和原型属性,而hasOwnProperty()只会检查自有属性

......(更多)

猜你喜欢

点击查看