About 704,000 results
Open links in new tab
  1. JavaScript: How to reverse a number? - Stack Overflow

    Jun 14, 2022 · Using JavaScript reverse() and Math.sign() you can reverse a number both positive and negative numbers.

  2. Reverse a number without making it a string in Javascript

    Jul 3, 2018 · function reverseNumber(number) { var revNumber = 0; while (number > 0) { revNumber = (revNumber * 10) + (number % 10); number = Math.floor(number / 10); } return …

  3. arrays - Reverse numbers in function without using ".reverse" …

    Dec 31, 2019 · You could reduce the original array and unshift each element onto the new array. function revertNumbers(...numberArray) { return numberArray.reduce((r, e) => { r.unshift(e); …

  4. JavaScript Program to Reverse Digits of a Number

    Aug 21, 2024 · Convert the number to an array of its digits, then employ the reduce () function with a spread operator to reverse the order. let digits = Array.from(String(num), Number); let …

  5. JavaScript Array reverse() Method - W3Schools

    The reverse() method reverses the order of the elements in an array. The reverse() method overwrites the original array.

  6. Array.prototype.reverse() - JavaScript | MDN - MDN Web Docs

    Apr 3, 2025 · The reverse() method of Array instances reverses an array in place and returns the reference to the same array, the first array element now becoming the last, and the last array …

  7. Reverse Digits of an Integer in JavaScript - Online Tutorials Library

    Aug 21, 2020 · Learn how to reverse the digits of an integer in JavaScript without using array or string methods. Follow this guide for step-by-step instructions.

  8. Master JavaScript: Reverse a Number WITHOUT Arrays!? - YouTube

    Aug 25, 2024 · Ready to level up your JavaScript skills? 🚀 In this reel, learn how to reverse a number without converting it to an array! No tricks, just pure JS magic! 🔄...

  9. Reverse a Number in JavaScript (7 Programs) - wscubetech.com

    Discover 7 different ways to reverse a number in JavaScript with easy-to-follow examples and output. Ideal for beginners to learn number manipulation step by step.

  10. Reverse Numbers in Function without Using Reverse Method in JavaScript

    Aug 31, 2020 · We are required to write a JavaScript function that takes in a number and returns its reversed number with converting it to an array or string. Let's write the code for this function …

  11. Some results have been removed
Refresh