ະఆٛܕผ var fruits; alert(fruits); // undefined ࣥߦ౸ະએࠂతᏓᏐɼ ။㗞ੜࡨޡฒதࢭࣥߦ Uncaught ReferenceError: fruits is not defined ༗એࠂबෆ။ࡨޡ http://f2eclass.com/lab/js/undefined.html http://f2eclass.com/lab/js/undefined-2.html
- ჩᏐɺճၚ var getStudentPosition = function (data) { return data.knock.position; }; Ṛ⅂ğݦൔႨఏῲ۷Ằྟ ߭ẖᆴč҂၂קေႵĎ var position = getStudentPosition(students); alert(position); വࣜత༻ɿ
var weekday = 1; switch (weekday) { case 1: alert("ظҰ"); break; case 2: alert("ظೋ"); break; case 3: alert("ظࡾ"); break; case 4: alert("ظ࢛"); break; case 5: alert("ظޒ"); break; case 6: alert("ظ"); break; case 7: alert("ظ"); break; default: alert("ॄኄࢠෆੋʂ"); }
(i in obj) { alert(i); // ࠑ݅తୈ n ݸሱੑతሱੑ໊ alert(obj[i]); // ࠑ݅తୈ n ݸሱੑతሱੑ } ओཁሣ݅ྨܕతᏓᏐ၏႔ཧ ࿅शɿྻग़ॴ༗ላੜత໊ࣈ foreach http://class.josephj.com/lab/js/js-foreach.html
MFOHUIࠑࣈ۲័ ๏ SFQMBDF GSPN UP from վҝ to ๏ JOEFY0G TUS ኺࣈ۲தፙ౸ str తҐஔ ๏ TVCTUS Y Z ҎࡧҾ x ։࢝औ y ݸࣈ ๏ TVCTUSJOH Y Z ҎࡧҾ x ~ y औಘ෦㟨㚎༰ ๏ TQMJU ፥։ਞྻ http://www.w3schools.com/jsref/jsref_obj_string.asp Կࣈ۲ᏓᏐ༗ҎԼሱੑ҃വࣜ