Console အဖွဲ့()
ဥပမာ
ကွန်ဆိုးလ်တွင် စာတိုအုပ်စုတစ်ခု ဖန်တီးပါ-
console.log("Hello world!");
console.group();
console.log("Hello again,
this time inside a group!");
အောက်တွင် နောက်ထပ် ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
group()
နည်းလမ်းသည် မက်ဆေ့ချ်အဖွဲ့ကို စတင်သည် ။
မက်ဆေ့ခ်ျအသစ်များအားလုံးကို ဤအဖွဲ့အတွင်းတွင် ရေးပေးမည်ဖြစ်သည်။
အထားအသို
console.group(label)
ကန့်သတ်ချက်များ
Parameter | Description |
label | Optional. A label for the group |
နောက်ထပ် ဥပမာများ
console.groupEnd() ဖြင့် အုပ်စုတစ်ခုကို အဆုံးသတ်ပါ။
console.log("Hello world!");
console.group();
console.log("Hello again,
this time inside a group!");
console.groupEnd();
console.log("and we
are back.");
အဖွဲ့အတွက် အညွှန်းတစ်ခု သတ်မှတ်ပါ-
console.log("Hello world!");
console.group("myLabel");
console.log("Hello again,
this time inside a group, with a label!");
Browser ပံ့ပိုးမှု
console.group()
ခေတ်မီဘရောက်ဆာများအားလုံးတွင် ပံ့ပိုးထားသည်။
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 11 | Yes | Yes | Yes | Yes |