快三大小单双口诀—官方网址22270.COM_JavaScript 瀛楃涓


快三大小单双口诀—官方网址22270.COM_JavaScript 瀛楃涓茬敤浜庡瓨鍌ㄥ拰澶勭悊鏂囨湰銆


快三大小单双口诀—官方网址22270.COM_JavaScript 瀛楃涓

瀛楃涓插彲浠ュ瓨鍌ㄤ竴绯诲垪瀛楃锛屽 "John Doe"銆

快三大小单双口诀—官方网址22270.COM瀛楃涓插彲浠ユ槸鎻掑叆鍒板紩鍙蜂腑鐨勪换浣曞瓧绗︺備綘鍙互浣跨敤鍗曞紩鍙锋垨鍙屽紩鍙凤細

瀹炰緥

var carname = "Volvo XC60";
var carname = 'Volvo XC60';

浣犲彲浠ヤ娇鐢ㄧ储寮曚綅缃潵璁块棶瀛楃涓蹭腑鐨勬瘡涓瓧绗︼細

瀹炰緥

var character = carname[7];

瀛楃涓茬殑绱㈠紩浠 0 寮濮嬶紝杩欐剰鍛崇潃绗竴涓瓧绗︾储寮曞间负 [0],绗簩涓负 [1], 浠ユ绫绘帹銆

浣犲彲浠ュ湪瀛楃涓蹭腑浣跨敤寮曞彿锛屽瓧绗︿覆涓殑寮曞彿涓嶈涓庡瓧绗︿覆鐨勫紩鍙风浉鍚:

瀹炰緥

var answer = "It's alright";
var answer = "He is called 'Johnny'";
var answer = 'He is called "Johnny"';

浣犱篃鍙互鍦ㄥ瓧绗︿覆娣诲姞杞箟瀛楃鏉ヤ娇鐢ㄥ紩鍙凤細

瀹炰緥

var x = 'It\'s alright';
var y = "He is called \"Johnny\"";

灏濊瘯涓涓 禄


瀛楃涓查暱搴

鍙互浣跨敤鍐呯疆灞炴 length 鏉ヨ绠楀瓧绗︿覆鐨勯暱搴︼細

瀹炰緥

var txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var sln = txt.length;

灏濊瘯涓涓 禄


鐗规畩瀛楃

鍦 快三大小单双口诀—官方网址22270.COM_JavaScript 涓紝瀛楃涓插啓鍦ㄥ崟寮曞彿鎴栧弻寮曞彿涓

鍥犱负杩欐牱锛屼互涓嬪疄渚 快三大小单双口诀—官方网址22270.COM_JavaScript 鏃犳硶瑙f瀽锛

聽"We are the so-called "Vikings" from the north."

瀛楃涓 "We are the so-called " 琚埅鏂

濡備綍瑙e喅浠ヤ笂鐨勯棶棰樺憿锛熷彲浠ヤ娇鐢ㄥ弽鏂滄潬 (\) 鏉ヨ浆涔 "Vikings" 瀛楃涓蹭腑鐨勫弻寮曞彿锛屽涓:

聽"We are the so-called \"Vikings\" from the north."

聽鍙嶆枩鏉犳槸涓涓杞箟瀛楃銆 杞箟瀛楃灏嗙壒娈婂瓧绗﹁浆鎹负瀛楃涓插瓧绗︼細

快三大小单双口诀—官方网址22270.COM杞箟瀛楃 (\) 鍙互鐢ㄤ簬杞箟鎾囧彿锛屾崲琛岋紝寮曞彿锛岀瓑鍏朵粬鐗规畩瀛楃銆

涓嬭〃涓垪涓句簡鍦ㄥ瓧绗︿覆涓彲浠ヤ娇鐢ㄨ浆涔夊瓧绗﹁浆涔夌殑鐗规畩瀛楃锛

浠g爜 杈撳嚭
\' 鍗曞紩鍙
\" 鍙屽紩鍙
\\ 鍙嶆枩鏉
\n 鎹㈣
\r 鍥炶溅
\t tab(鍒惰〃绗)
\b 閫鏍肩
\f 鎹㈤〉绗


瀛楃涓插彲浠ユ槸瀵硅薄

閫氬父锛 快三大小单双口诀—官方网址22270.COM_JavaScript 瀛楃涓叉槸鍘熷鍊硷紝鍙互浣跨敤瀛楃鍒涘缓锛 var firstName = "John"

浣嗘垜浠篃鍙互浣跨敤 new 鍏抽敭瀛楀皢瀛楃涓插畾涔変负涓涓璞★細 var firstName = new String("John")

瀹炰緥

var x = "John";
var y = new String("John");
typeof x // 杩斿洖 String
typeof y // 杩斿洖 Object

灏濊瘯涓涓 禄

Note 涓嶈鍒涘缓 String 瀵硅薄銆傚畠浼氭嫋鎱㈡墽琛岄熷害锛屽苟鍙兘浜х敓鍏朵粬鍓綔鐢細

瀹炰緥

var x = "John";聽聽聽聽聽聽聽聽聽聽聽聽聽
var y = new String("John");
(x === y) // 缁撴灉涓 false锛屽洜涓 x 鏄瓧绗︿覆锛寉 鏄璞

灏濊瘯涓涓 禄

=== 涓虹粷瀵圭浉绛夛紝鍗虫暟鎹被鍨嬩笌鍊奸兘蹇呴』鐩哥瓑銆



瀛楃涓插睘鎬у拰鏂规硶

快三大小单双口诀—官方网址22270.COM鍘熷鍊煎瓧绗︿覆锛屽 "John", 娌℃湁灞炴у拰鏂规硶(鍥犱负浠栦滑涓嶆槸瀵硅薄)銆

鍘熷鍊煎彲浠ヤ娇鐢 快三大小单双口诀—官方网址22270.COM_JavaScript 鐨勫睘鎬у拰鏂规硶锛屽洜涓 快三大小单双口诀—官方网址22270.COM_JavaScript 鍦ㄦ墽琛屾柟娉曞拰灞炴ф椂鍙互鎶婂師濮嬪煎綋浣滃璞°

瀛楃涓叉柟娉曟垜浠皢鍦ㄤ笅涓绔犺妭涓粙缁嶃


瀛楃涓插睘鎬

灞炴 鎻忚堪
constructor 杩斿洖鍒涘缓瀛楃涓插睘鎬х殑鍑芥暟
length 杩斿洖瀛楃涓茬殑闀垮害
prototype 鍏佽鎮ㄥ悜瀵硅薄娣诲姞灞炴у拰鏂规硶


瀛楃涓叉柟娉

鏇村鏂规硶瀹炰緥鍙互鍙傝锛快三大小单双口诀—官方网址22270.COM_JavaScript String 瀵硅薄

鏂规硶 鎻忚堪
charAt() 杩斿洖鎸囧畾绱㈠紩浣嶇疆鐨勫瓧绗
charCodeAt() 杩斿洖鎸囧畾绱㈠紩浣嶇疆瀛楃鐨 Unicode 鍊
concat() 杩炴帴涓や釜鎴栧涓瓧绗︿覆锛岃繑鍥炶繛鎺ュ悗鐨勫瓧绗︿覆
fromCharCode() 灏 Unicode 杞崲涓哄瓧绗︿覆
indexOf() 杩斿洖瀛楃涓蹭腑妫绱㈡寚瀹氬瓧绗︾涓娆″嚭鐜扮殑浣嶇疆
lastIndexOf() 杩斿洖瀛楃涓蹭腑妫绱㈡寚瀹氬瓧绗︽渶鍚庝竴娆″嚭鐜扮殑浣嶇疆
localeCompare() 鐢ㄦ湰鍦扮壒瀹氱殑椤哄簭鏉ユ瘮杈冧袱涓瓧绗︿覆
match() 鎵惧埌涓涓垨澶氫釜姝e垯琛ㄨ揪寮忕殑鍖归厤
replace() 鏇挎崲涓庢鍒欒〃杈惧紡鍖归厤鐨勫瓙涓
search() 妫绱笌姝e垯琛ㄨ揪寮忕浉鍖归厤鐨勫
slice() 鎻愬彇瀛楃涓茬殑鐗囨柇锛屽苟鍦ㄦ柊鐨勫瓧绗︿覆涓繑鍥炶鎻愬彇鐨勯儴鍒
split() 鎶婂瓧绗︿覆鍒嗗壊涓哄瓙瀛楃涓叉暟缁
substr() 浠庤捣濮嬬储寮曞彿鎻愬彇瀛楃涓蹭腑鎸囧畾鏁扮洰鐨勫瓧绗
substring() 鎻愬彇瀛楃涓蹭腑涓や釜鎸囧畾鐨勭储寮曞彿涔嬮棿鐨勫瓧绗
toLocaleLowerCase() 鏍规嵁涓绘満鐨勮瑷鐜鎶婂瓧绗︿覆杞崲涓哄皬鍐欙紝鍙湁鍑犵璇█锛堝鍦熻冲叾璇級鍏锋湁鍦版柟鐗规湁鐨勫ぇ灏忓啓鏄犲皠
toLocaleUpperCase() 鏍规嵁涓绘満鐨勮瑷鐜鎶婂瓧绗︿覆杞崲涓哄ぇ鍐欙紝鍙湁鍑犵璇█锛堝鍦熻冲叾璇級鍏锋湁鍦版柟鐗规湁鐨勫ぇ灏忓啓鏄犲皠
toLowerCase() 鎶婂瓧绗︿覆杞崲涓哄皬鍐
toString() 杩斿洖瀛楃涓插璞″
toUpperCase() 鎶婂瓧绗︿覆杞崲涓哄ぇ鍐
trim() 绉婚櫎瀛楃涓查灏剧┖鐧
valueOf() 杩斿洖鏌愪釜瀛楃涓插璞$殑鍘熷鍊