楼主: cmwei333
1628 9

【Apress】 JavaScript Recipes : A Problem-Solution Approach (2017) [推广有奖]

贵宾

已卖:205124份资源

泰斗

1%

还不是VIP/贵宾

-

TA的文库  其他...

【历史+心理学+社会自然科学】

【数学+统计+计算机编程】

【金融+经济+商学+国际政治】

威望
6
论坛币
3606565 个
通用积分
1126.1851
学术水平
4327 点
热心指数
4650 点
信用等级
3957 点
经验
363248 点
帖子
9795
精华
9
在线时间
2842 小时
注册时间
2015-2-9
最后登录
2017-1-29

初级热心勋章 中级热心勋章 高级热心勋章 初级信用勋章 中级信用勋章 初级学术勋章 特级热心勋章 中级学术勋章 高级信用勋章 高级学术勋章 特级学术勋章 特级信用勋章

楼主
cmwei333 发表于 2016-12-23 17:30:55 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
JavaScript Recipes
A Problem-Solution Approach

Authors: Russ Ferguson, Keith Cirkel

cover.jpg

Much more inclusive of varied JS problems than the direct O'Reilly competitor

Right up-to-date with the latest version of JavaScript

Includes recipes for using frameworks and Node.js as well as the main JS recipes

This comprehensive book is your go-to reference for tackling common and advanced JavaScript tasks. JavaScript is the world’s most popular client-side scripting language and is gaining popularity on the server. Using a problem-solution approach, this book takes you from language basics like built-in objects and flow control all the way to advanced optimization techniques, frameworks and Node.js. Quickly discover solutions to common problems, best practices you can follow, and everything JavaScript has to offer.

With JavaScript Recipes you will learn language fundamentals like types, conversions, execution contexts, expressions, operators, statements, and built-in objects. With this book you'll be able to explore and make the most of your script’s host environment and how to create your own JavaScript host using Google’s V8 engine. Employ advanced optimization techniques to create scripts that execute as fast, or faster, than native executables.

JavaScript Recipes shows you how to avoid wasting development time and concentrate on developing cutting-edge applications. You’ll see how much quicker and efficient it is to develop with JavaScript. Start becoming a JavaScript pro with JavaScript Recipes today.

目录截图:

pic.jpg

本帖隐藏的内容

原版 PDF:
JavaScript Recipes_A Problem-Solution Approach.pdf (6.06 MB, 需要: 18 个论坛币)

PDF 压缩包:
JavaScript Recipes_A Problem-Solution Approach.zip (4.71 MB, 需要: 18 个论坛币) 本附件包括:
  • JavaScript Recipes_A Problem-Solution Approach.pdf


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Javascript Solution Approach solutio problem popularity reference tackling problems version

已有 1 人评分经验 论坛币 收起 理由
Nicolle + 100 + 100 精彩帖子

总评分: 经验 + 100  论坛币 + 100   查看全部评分

本帖被以下文库推荐

bbs.pinggu.org/forum.php?mod=collection&action=view&ctid=3257
bbs.pinggu.org/forum.php?mod=collection&action=view&ctid=3258
bbs.pinggu.org/forum.php?mod=collection&action=view&ctid=3259

沙发
life_life(真实交易用户) 发表于 2016-12-23 18:05:44
看看    看看  

藤椅
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:31:38
  1. Listing 9-1. Objects Can Be Created Using Either the Object Constructor or by Creating an Object Literal
  2. var R2D2 = new Object();
  3. R2D2.class = 'Astromech Droid';
  4. var R2D2 = {
  5. class:'Astromech Droid';
  6. manufacturer: 'Industrial Automaton';
  7. };
复制代码

板凳
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:33:22
  1. Listing 9-2. Accessing Properties of an Object Using Dot Notation and Bracket Syntax
  2. var R2D2 = {
  3. };
  4. R2D2['class'] = 'Astromech Droid'
  5. console.log(R2D2['class']); //returns Astromech Droid
  6. R2D2.manufacturer = 'Industrial Automaton';
  7. console.log(R2D2.manufacturer); //returns Industrial Automaton
复制代码

报纸
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:34:36
  1. Listing 9-3. Some of the Differences Between Objects and Arrays
  2. Object.prototype.good = "stuff";
  3. var ship = {
  4. type:40,
  5. name:'tardis',
  6. color:'blue'
  7. };
  8. for(var prop in ship){
  9. console.log(prop + ': ' + ship[prop]);
  10. }
  11. var numArray = [1, 2, 3, 4, 5, 6, 7, 8, 9];
  12. for(var prop in numArray){
  13. console.log(prop + ': ' + numArray[prop]);
  14. }
  15. for(var i = 0; i <numArray.length; i++){
  16. console.log(numArray[i]);
  17. }
  18. How It Works
  19. Since almost everything you work with in JavaScript is an object, arrays also inherent properties of objects.
  20. Depending on how you loop through the object or array, you access any enumerable property on the object
  21. or its prototype. If you’re using a for…in loop, both the array and the object will access the “good” property.
  22. When using a for loop on the array, only the indexed elements are accessed.
复制代码

地板
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:36:16
  1. Listing 9-4. Using Variables to Access Properties of an Object
  2. var ship = {};
  3. var type = 'spaceShip';
  4. ship[type] = 'X-Wing';
  5. console.log(ship[type]); //returns X-Wing
  6. console.log(ship.spaceShip); //returns X-Wing
  7. console.log(ship.type); //returns undefined
复制代码

7
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:37:19
  1. Listing 9-5. Using the defineProperty Method Inside a Class
  2. function SuperHeroTeam() {
  3. this.name = 'The Avengers';
  4. var _numberOfMembers; // private member
  5. Object.defineProperty(this,"numberOfMemebers",{
  6. get: function() { return _numberOfMembers; },
  7. set: function(value) { _numberOfMembers = value; }
  8. });
  9. Object.defineProperty(this,"tagline",{
  10. value: 'Earth\'s Mightiest Heroes',
  11. configurable: false
  12. });
  13. }
  14. var team = new SuperHeroTeam();
  15. team.numberOfMembers = 8;
  16. console.log(team.numberOfMembers);
  17. team.tagline = 'The Amazing'; //not editable
  18. console.log(team.tagline); // returns Earth's Mightiest Heroes
复制代码

8
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:38:31
  1. Listing 9-6. getOwnPropertyNames Returns an Array of All Properties
  2. function SuperHeroTeam() {
  3. this.name = 'The Avengers';
  4. var _numberOfMembers; // private member
  5. Object.defineProperty(this,"numberOfMemebers",{
  6. get: function() { return _numberOfMembers; },
  7. set: function(value) { _numberOfMembers = value; }
  8. });

  9. Object.defineProperty(this,"tagline",{
  10. value: 'Earth\'s Mightiest Heroes',
  11. configurable: false
  12. });
  13. }
  14. var team = new SuperHeroTeam();
  15. Object.getOwnPropertyNames(team).forEach(function(val){
  16. console.log(val); // returns name. numberOfNames, tagline
  17. });
复制代码

9
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:39:09
  1. Listing 9-7. Returning Only the Enumerable Properties of an Object
  2. var myObj = {a:1, b:2, c:3};
  3. console.log(Object.keys(myObj)); //returns ["a", "b", "c"]
复制代码

10
Lisrelchen(未真实交易用户) 发表于 2016-12-25 14:39:51
  1. Listing 9-8. forEach Allows You to Perform a Function on Every Element of an Array, but Passes Undefined
  2. If There Is No Value
  3. var myObj = {a:1, b:2, c:3};
  4. console.log(myObj.propertyIsEnumerable('a')); //returns true
  5. console.log(myObj.propertyIsEnumerable('length')); //returns false
复制代码

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
jg-xs1
拉您进交流群
GMT+8, 2026-1-1 09:43