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


telegram Telegram | DID YOU KNOW?

Date: |

The Singapore stock market has alternated between positive and negative finishes through the last five trading days since the end of the two-day winning streak in which it had added more than a dozen points or 0.4 percent. The Straits Times Index now sits just above the 3,060-point plateau and it's likely to see a narrow trading range on Monday.

Telegram and Signal Havens for Right-Wing Extremists

Since the violent storming of Capitol Hill and subsequent ban of former U.S. President Donald Trump from Facebook and Twitter, the removal of Parler from Amazon’s servers, and the de-platforming of incendiary right-wing content, messaging services Telegram and Signal have seen a deluge of new users. In January alone, Telegram reported 90 million new accounts. Its founder, Pavel Durov, described this as “the largest digital migration in human history.” Signal reportedly doubled its user base to 40 million people and became the most downloaded app in 70 countries. The two services rely on encryption to protect the privacy of user communication, which has made them popular with protesters seeking to conceal their identities against repressive governments in places like Belarus, Hong Kong, and Iran. But the same encryption technology has also made them a favored communication tool for criminals and terrorist groups, including al Qaeda and the Islamic State.

telegram from us


Telegram Brogrammist
FROM USA