Konsol grubuDaraltılmış()
Örnek
Konsolda daraltılmış bir mesaj grubu oluşturun:
console.log("Hello world!");
console.groupCollapsed();
console.log("Hello again,
this time inside a collapsed group!");
Aşağıda daha fazla örnek.
Tanım ve Kullanım
Yöntem groupCollapsed()
, daraltılmış bir mesaj grubunu başlatır.
Konsolda, yeni mesaj grubunu açmak için genişlet düğmesine tıklayın.
Artık tüm yeni mesajlar bu grubun içine yazılacak.
Sözdizimi
console.groupCollapsed(label)
parametreler
Parameter | Description |
label | Optional. A label for the group. |
Daha fazla örnek
Bir grubu console.groupEnd() ile sonlandırın:
console.log("Hello world!");
console.groupCollapsed();
console.log("Hello again,
this time inside a collapsed group!");
console.groupEnd();
console.log("and we
are back.");
Daraltılmış grup için bir etiket belirtin:
console.log("Hello world!");
console.groupCollapsed("myLabel");
console.log("Hello again,
this time inside a collapsed group, with a label!");
Tarayıcı Desteği
console.groupCollapsed()
tüm modern tarayıcılarda desteklenir:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 11 | Yes | Yes | Yes | Yes |