Telegram Group & Telegram Channel
console.dir() chuqurligi

Bugun console.dir() da "depth" parametri borligini o'rgandim. Odatda Node.js da obyektlarni terminalga chiqarishda console.log() yoki console.dir() dan foydalanaman. Ikkovini farqini shu paytgacha sezmaganman. Faqat brauzer konsolida farqini bilar edim. (Siz bilasizmi?)

Xullas, odatda obyektlarni terminalga chiqarganda, obyektlar qisqartirib ko'rsatiladi, ya'ni "chuqurroq" joylashgan ma'lumotlar "[Object]" deb qisqartirib ketiladi.

Obyektlarni to'liq ko'rish uchun esa bunday qilish mumkin ekan:


console.dir(obj, { depth: 100 });

"depth" - istalgan son, xatto Infinity bo'lishi mumkin.

Har xil JS bajarilish muhitlarida (runtime environment) sinab ko'rdim. Qizig'i, "Bun"da obyektlar doimo to'liq ko'rsatilar ekan.



tg-me.com/brogrammist/246
Create:
Last Update:

console.dir() chuqurligi

Bugun console.dir() da "depth" parametri borligini o'rgandim. Odatda Node.js da obyektlarni terminalga chiqarishda console.log() yoki console.dir() dan foydalanaman. Ikkovini farqini shu paytgacha sezmaganman. Faqat brauzer konsolida farqini bilar edim. (Siz bilasizmi?)

Xullas, odatda obyektlarni terminalga chiqarganda, obyektlar qisqartirib ko'rsatiladi, ya'ni "chuqurroq" joylashgan ma'lumotlar "[Object]" deb qisqartirib ketiladi.

Obyektlarni to'liq ko'rish uchun esa bunday qilish mumkin ekan:


console.dir(obj, { depth: 100 });

"depth" - istalgan son, xatto Infinity bo'lishi mumkin.

Har xil JS bajarilish muhitlarida (runtime environment) sinab ko'rdim. Qizig'i, "Bun"da obyektlar doimo to'liq ko'rsatilar ekan.

BY Brogrammist






Share with your friend now:
tg-me.com/brogrammist/246

View MORE
Open in Telegram


Brogrammist Telegram | DID YOU KNOW?

Date: |

The lead from Wall Street offers little clarity as the major averages opened lower on Friday and then bounced back and forth across the unchanged line, finally finishing mixed and little changed.The Dow added 33.18 points or 0.10 percent to finish at 34,798.00, while the NASDAQ eased 4.54 points or 0.03 percent to close at 15,047.70 and the S&P 500 rose 6.50 points or 0.15 percent to end at 4,455.48. For the week, the Dow rose 0.6 percent, the NASDAQ added 0.1 percent and the S&P gained 0.5 percent.The lackluster performance on Wall Street came on uncertainty about the outlook for the markets following recent volatility.

To pay the bills, Mr. Durov is issuing investors $1 billion to $1.5 billion of company debt, with the promise of discounted equity if the company eventually goes public, the people briefed on the plans said. He has also announced plans to start selling ads in public Telegram channels as soon as later this year, as well as offering other premium services for businesses and users.

Brogrammist from ca


Telegram Brogrammist
FROM USA