ui.data.ActiveList.insert
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
यह फ़ंक्शन, तय किए गए इंडेक्स पर कोई एलिमेंट डालता है और सूची के बाकी एलिमेंट को आगे बढ़ा देता है. अगर दिया गया इंडेक्स, सूची की लंबाई से ज़्यादा है, तो एलिमेंट को सूची में जोड़ दिया जाएगा.
यह ui.data.ActiveList दिखाता है.
इस्तेमाल | रिटर्न |
---|
ActiveList.insert(index, el) | ui.data.ActiveList |
आर्ग्यूमेंट | टाइप | विवरण |
---|
यह: ui.data.activelist | ui.data.ActiveList | ui.data.ActiveList इंस्टेंस. |
index | नंबर | वह इंडेक्स जहां एलिमेंट को डालना है. |
el | ऑब्जेक्ट | वह एलिमेंट जिसे शामिल करना है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe \u003ccode\u003einsert\u003c/code\u003e method adds an element to a \u003ccode\u003eui.data.ActiveList\u003c/code\u003e at a specific index, shifting existing elements if necessary.\u003c/p\u003e\n"],["\u003cp\u003eIf the provided index exceeds the list's length, the element is appended to the end.\u003c/p\u003e\n"],["\u003cp\u003eThis method returns the original \u003ccode\u003eui.data.ActiveList\u003c/code\u003e instance, enabling method chaining.\u003c/p\u003e\n"],["\u003cp\u003eIt accepts the insertion index and the element to be inserted as arguments.\u003c/p\u003e\n"]]],["The `insert(index, el)` method adds an element (`el`) to a list (`ui.data.ActiveList`) at a given index. If the `index` exceeds the list's length, the element is added to the end. It shifts existing elements to accommodate the new one. The method returns the modified `ui.data.ActiveList` instance. The index and element are specified as arguments when calling the method.\n"],null,["# ui.data.ActiveList.insert\n\n\u003cbr /\u003e\n\nInserts an element at the specified index and shifts the rest of the list. If the specified index is greater than the length of the list, the element will be appended to the list.\n\n\u003cbr /\u003e\n\nReturns this ui.data.ActiveList.\n\n| Usage | Returns |\n|--------------------------------|--------------------|\n| ActiveList.insert`(index, el)` | ui.data.ActiveList |\n\n| Argument | Type | Details |\n|----------------------------|--------------------|-------------------------------------------|\n| this: `ui.data.activelist` | ui.data.ActiveList | The ui.data.ActiveList instance. |\n| `index` | Number | The index at which to insert the element. |\n| `el` | Object | The element to insert. |"]]