JavaScript基礎(2)---懶人CC的自學筆記
作者:ChinaJavaWorld_CC 日期:2007-04-11 18:48:04
特点:
1.区分大小写: app != App
2.变量是弱类型: var x = "Hello"; x = 3; x = true;
3.每行结尾的分号可有可无: var x = 3 or var x = 3;
4.与java注释相同: (1) // (2) /* ... */
5.括号表明代码块: { ... }
变量:
声明变量 var x = "hello";
同行声明多个变量用","隔开而且可以声明不同类型的变量 var x = "hello", y = 3;
在使用变量前也可以不声明
声明变量规则: 1.第一个字符必须是字母、下划线或美元符号; 2.余下的字符可以是下划线、美元符号、任何字母或数字字符
关键字:
break, case, catch, continue, default, delete, do, else, finally, for, function, if, in, instanceof, new, return, switch, this, throw, try, typeof, var, void, while, with
保留字:
abstract, boolean, byte, char, class, const, debugger, double, enum, export, extends, final, float, goto, implements, import, int, interface, long, native, package, private, protected, public, short, static, super, synchronized, throws, transient, volatile
变量分为原始值和引用值:
原始值是存储在栈中的简单数据;引用值是存储在堆中的对象
原始类型: Undefined, Null, Boolean, Number, String
typeof判断类型 :
var test = "a";
alert(typeof test); // output ---> string
teest = null;
alert(typeof test); // output ---> object
Undefined类型只有一个值: undefined
Null类型只有一个值: null null == undefined
Boolean类型有两个值: true/false
Number类型包括的特殊值: Number.MAX_VALUE, Number.MIN_VALUE, Number.POSITIVE_INFINITY(Infinity), Number.NEGATIVE_INFINITY(-Infinity), NaN
isFinit()方法判断是否无穷数
isNaN()方法判断是否非数
引用类型:
Object类:
属性--Constructor, Prototype
方法--hasOwnProperty(property), isPrototypeOf(object), propertyIsEnumerable(property), toString(), valueOf()
Boolean类: boolean类的引用类型
Number类: number类的引用类型
方法--toFixed(), toExponential(), toPrecision()
String类: string类的引用类型
方法--charAt(), charCodeAt(), concat(), indexOf(), lastIndexOf(), localeCompare(), slice(), substring(), toLowerCase(), toLocaleLowerCase(), toUpperCase(), toLocaleUpperCase()
instanceof: 识别对象类型
运算符:
一元运算符: delete, void, ++i/--i, i++/i--, +i/-i
位运算符: ~, &, ^, <<, >>, >>>
Boolean运算符: !, &&, ||
乘性运算符: *, /, %
加性运算符: +/-
关系运算符: <, >, <=, >=
等性运算符: ==, !=, ===, !==
条件运算符: (A > B) ? A : B
赋值运算符: =
逗号运算符: ","
语句:
if语句: if(condition) statement1 else statement2 / if(condition1) statement1 else if(condition2) statement2 else ...
do-while语句: do { statement } while(expression);
while语句: while(expression) { statement }
for语句: for(initialization; expression; post-loop-expression) { statement }
for-in语句: for(property in expression) { statement }
break语句: break;
continue语句: continue;
with语句: with(expression) { statement }
switch语句: switch(expression) { case value : statement break; ... break; default : statement }
1.区分大小写: app != App
2.变量是弱类型: var x = "Hello"; x = 3; x = true;
3.每行结尾的分号可有可无: var x = 3 or var x = 3;
4.与java注释相同: (1) // (2) /* ... */
5.括号表明代码块: { ... }
变量:
声明变量 var x = "hello";
同行声明多个变量用","隔开而且可以声明不同类型的变量 var x = "hello", y = 3;
在使用变量前也可以不声明
声明变量规则: 1.第一个字符必须是字母、下划线或美元符号; 2.余下的字符可以是下划线、美元符号、任何字母或数字字符
关键字:
break, case, catch, continue, default, delete, do, else, finally, for, function, if, in, instanceof, new, return, switch, this, throw, try, typeof, var, void, while, with
保留字:
abstract, boolean, byte, char, class, const, debugger, double, enum, export, extends, final, float, goto, implements, import, int, interface, long, native, package, private, protected, public, short, static, super, synchronized, throws, transient, volatile
变量分为原始值和引用值:
原始值是存储在栈中的简单数据;引用值是存储在堆中的对象
原始类型: Undefined, Null, Boolean, Number, String
typeof判断类型 :
var test = "a";
alert(typeof test); // output ---> string
teest = null;
alert(typeof test); // output ---> object
Undefined类型只有一个值: undefined
Null类型只有一个值: null null == undefined
Boolean类型有两个值: true/false
Number类型包括的特殊值: Number.MAX_VALUE, Number.MIN_VALUE, Number.POSITIVE_INFINITY(Infinity), Number.NEGATIVE_INFINITY(-Infinity), NaN
isFinit()方法判断是否无穷数
isNaN()方法判断是否非数
引用类型:
Object类:
属性--Constructor, Prototype
方法--hasOwnProperty(property), isPrototypeOf(object), propertyIsEnumerable(property), toString(), valueOf()
Boolean类: boolean类的引用类型
Number类: number类的引用类型
方法--toFixed(), toExponential(), toPrecision()
String类: string类的引用类型
方法--charAt(), charCodeAt(), concat(), indexOf(), lastIndexOf(), localeCompare(), slice(), substring(), toLowerCase(), toLocaleLowerCase(), toUpperCase(), toLocaleUpperCase()
instanceof: 识别对象类型
运算符:
一元运算符: delete, void, ++i/--i, i++/i--, +i/-i
位运算符: ~, &, ^, <<, >>, >>>
Boolean运算符: !, &&, ||
乘性运算符: *, /, %
加性运算符: +/-
关系运算符: <, >, <=, >=
等性运算符: ==, !=, ===, !==
条件运算符: (A > B) ? A : B
赋值运算符: =
逗号运算符: ","
语句:
if语句: if(condition) statement1 else statement2 / if(condition1) statement1 else if(condition2) statement2 else ...
do-while语句: do { statement } while(expression);
while语句: while(expression) { statement }
for语句: for(initialization; expression; post-loop-expression) { statement }
for-in语句: for(property in expression) { statement }
break语句: break;
continue语句: continue;
with语句: with(expression) { statement }
switch语句: switch(expression) { case value : statement break; ... break; default : statement }
平均得分
(0 次评分)
评论: 8 | 查看次数: 1038
- 共有 8 条评论
- 共有 8 条评论
发表评论
订阅
上一篇
|

文章来自:
标签: 





balance . mp3 mp4 player plays a part in the outcome . mp3 mp4 player of combat, gear is a major differentiator that makes up for shortcomings in other areas. mp3 mp4 player In fact, with . mp3 player kaufen the introduction of Resilience, gear more than mp4 ever plays a more substantial part in PvP. power level In an Arena match, the very first thing we . power level scope out is gear. wow level Through quick tab-selection viewing .wow leveling of character portraits, we generally wow lvl have a good idea of the classes we're up against if they keep their helm graphic on. wow lvl If they are wearing Season 3 shoulders, then we know . wow lvl 60 their relative experience. wow lvl 70 This is why the visual i.wow power leveling mpact of Arena shoulders is so important.wow powerlevel It immediately gives you a general idea of how tough the match will be. wow powerlevel Players in full S3 will likely have over 10k hp and over. wow powerleveling 400 Resilience, depending on the class and spec. A full S3 SL/SL Warlock, for example, will easily have. about 12-13k hp and over 400 Resilience. Identifying weapons is slightly more . difficult but will also give a general idea of an enemy's strength. Season 1 and 2 weapons share the same graphics, so it's harder to identify. Season 3 weapons, on the other hand, are distinctive and share models with Black Temple and Mount Hyjal weapons. which 最新免费网络游戏 have relatively the same power. A review of Brutal Gladiator weapons will come in handy because these will be the most common way to identify opponents of relative skill. With the new mechanics. in place for Arenas, Season 4 will more or less weed out the chaff from the grain.
Warhammer Gold
Warhammer Online Gold
Warhammer Accounts
Warhammer Power Leveling
Warhammer Online Key
Warhammer Gold
Warhammer Online Gold
Warhammer Time Card
Warhammer CD Key
WAR gold
warhammer online gold
Buy WAR gold
Buy warhammer gold
Buy warhammer online gold
warhammer gold
WAR Accounts
warhammer Accounts
warhammer online Accounts
Buy WAR Accounts
warhammer Accounts for sale
Warhammer Power Leveling
Warhammer Online Power Leveling
War Power Leveling
Buy Warhammer Power Leveling
Warhammer PowerLeveling
Cheap Warhammer Power Leveling
Cheap Warhammer Online Power Leveling
Buy War Power Leveling
Warhammer EU Power Leveling
Cheap Warhammer Gold
Cheap Warhammer online gold
Buy Cheap Warhammer Gold
Buy WAR Gold
Warhammer EU Gold
Warhammer EU Power Leveling
Warhammer EU CD Key
Warhammer EU Accounts
Warhammer CD Key
Warhammer online CD Key
Warhammer Timecard
Buy Warhammer Time Card
Warhammer 60 days Time Card
Cheap WAR Accounts
Cheap warhammer Accounts
Cheap warhammer online Accounts
Buy Cheap WAR Accounts
buy Warhammer CD Key
buy Warhammer online CD Key
cheap Warhammer CD key
warhammer time card
Warhammer prepaid time card
Buy Lotro Gold | Lord Of The Rings Online Gold
Lotro Accounts
| Buy Lotro Accounts
Lord Of The Rings Online Power Leveling | Lord Of The Rings Online PowerLeveling
Lotro Cd Key | Lord Time Card
Lotro Gold | Lotro Gold Instant Delivery
lord of the rings online accounts | lord of the rings online accounts for sale
Lotro Power Leveling | Lotro Powerleveling
Lord Of The Rings Online Cd Key | Lord Of The Rings Online Time Card
Lord of the Rings Online Gold
Buy Lotro Gold
Sell LoTRO Gold
LoTRO CD Key
LoTRO Europe Gold
Cheap LoTRO Accounts
Lord of the Rings Online Power Leveling
Lord of the Rings online CD Key
Cheap Lotro Gold
wow power leveling
wow power leveling
窃听器
手机监听器
监听器
手机窃听器
窃听器
手机监听器
监听器
手机窃听器
窃听器
手机监听器
监听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
手机窃听器│窃听器
wow gold
wow gold
wow gold
wow gold
wow gold
item4sale
item4sale
item4sale
item4sale
item4sale
buy age of conan gold
buy age of conan gold
buy age of conan gold
buy age of conan gold
buy age of conan gold
连锁洗衣店加盟
连锁洗衣店加盟
加盟干洗店连锁
加盟干洗店连锁
干洗机价格
干洗机价格
洗涤机械
洗涤机械
洗鞋
洗鞋
擦鞋连锁
擦鞋连锁
擦鞋店加盟
擦鞋店加盟
鞋机
鞋机
擦鞋修鞋
擦鞋修鞋
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
wow gold
上海翻译
太阳能路灯
英语培训
英语口语
藏獒
防腐管道
液压缸
油缸
移民
投资移民
加拿大移民
技术移民
移民加拿大
澳洲技术移民
德国移民
移民澳洲
澳洲移民
出国移民
移民出国
英国移民
澳大利亚移民
加拿大投资移民
加拿大技术移民
北京旅游
北京旅行社
条码机
条码打印机
条形码打印机
防腐设备
煤气发生炉
美国留学
法国留学
法国留学
北欧留学
瑞典留学
芬兰留学
澳洲留学
除湿机
抽湿机
工业除湿机
空气净化器
空气净化机
美术培训
美术高考
美术高考培训
画室
北京画室
谐波治理
无功补偿