ChatCrawlersearch across public Telegram Open the app
ن

نودجی اس | Nodejs | NestJS | javascript | جاوااسکریپت | typescript

сообщение · 2024-06-26 20:16 UTC
M
Replymessage unavailable
Фотография
click to show
💬 این متد دوتا ورودی به اس start و end میگیره در وقاقع شما با استفاده از این دو ورودی تعیین میکنید چه بخشی از آرایه مورد نظرتون رو برداره بهتون نمایش بده 💬 همچنین خروجی این متد یک آرایه از اون تیکه های جدا شده هست 💬 توجه کنید که هردوتا ورودی start و end اختیاری هستن و میتونید واردشون نکنید که در این صورت مقدار پیشفرض start اولین عنصر آرایه و مقدار پیشفرض end آخرین عنصر آرایه هستش پس طبیعیه که در صورت ندادن ورودی کل آرایه رو برمیگردونه Example 1‍ const animals = ['ant', 'bison', 'camel', 'duck', 'elephant']; console.log(animals.slice()); // ["ant", "bison", "camel", "duck", "elephant"] Example 2 const animals = ['ant', 'bison', 'camel', 'duck', 'elephant']; console.log(animals.slice(1,3)); // ["bison", "camel"] Example 3 const animals = ['ant', 'bison', 'camel', 'duck', 'elephant']; console.log(animals.slice(2)); // ["camel", "duck", "elephant"] هرشب یه متد از جاواسکریپت رو یاد بگیر 😉 @LearnByLearn #method_slice #javascript_method
889 ·

Вся лента · оригинал в Telegram

Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog