[[["เข้าใจง่าย","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-26 UTC"],[[["`firstNonZero()` is a method that selects and returns the first number if it is not zero, otherwise, it returns the second number."],["It takes two arguments: the left-hand value (`this: left`) and the right-hand value (`right`), both of which should be of type Number."],["This function can be useful for conditional selections where a fallback value is needed if the primary value is zero."]]],["The `firstNonZero` method, applied to a number (`left`), takes another number (`right`) as an argument. It returns the `left` value if it's non-zero; otherwise, it returns the `right` value. The method is available in both JavaScript and Python, operating on numerical data. Examples show that `firstNonZero` selects 5 when given (0, 5) or (5, 0) as inputs.\n"]]