JavaScript
World-in-Words
这个作者很懒,什么都没留下…
展开
-
Loops in JavaScript
1. Loop Syntax for (var index=1; index code code code; } 2. Array Syntax var arrayname = [data1, data2, data3, ...] 列表元素从0开始计数,元素类型任意 3. Loop & Array var arr = ["a", "b", 1, 2, "c"原创 2013-12-15 17:20:49 · 521 阅读 · 0 评论 -
Functions
1. Syntax var functionName = function (param1 [param2, param3, ...]) { code code code; code code code; (more lines of code); return value; }; // function calls var resu原创 2013-12-15 16:24:11 · 475 阅读 · 0 评论 -
Introduction to JavaScipt
1. What can we use JavaScript for? make websites respond to user interactionbuild apps and games (e.g.blackjack)access information on the Internet (e.g. find out the top trending words on Twitt原创 2013-12-15 12:36:34 · 643 阅读 · 0 评论 -
More on Control Flow
Switch switch (/*Some expression*/) { case 'option1': // Do something break; case 'option2': // Do something else break; case 'option3': // Do a原创 2013-12-16 21:33:19 · 459 阅读 · 0 评论