تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-29 (حسب التوقيت العالمي المتفَّق عليه)"],[[["`Array.firstNonZero()` selects the first array's element if it's non-zero; otherwise, it selects the corresponding element from the second array."],["This function operates element-wise on two input arrays (`left` and `right`)."],["If the `left` array element is 0, the corresponding element from the `right` array is chosen."],["The function returns a new array containing the selected elements."],["It's useful for scenarios like conditional data selection based on zero/non-zero values."]]],["The `firstNonZero` method compares two arrays (`left` and `right`) element-wise. If an element in the `left` array is non-zero, that value is selected. Otherwise, the corresponding element from the `right` array is chosen. The method returns a new array where each element is the result of this comparison. Both JavaScript and Python examples show how to implement and the result. The return value is an array.\n"]]