About 871,000 results
Open links in new tab
  1. How to get numeric value from a prompt box? - Stack Overflow

    Jul 28, 2013 · You have to use parseInt() to convert. For eg. var z = parseInt(x) + parseInt(y); use parseFloat() if you want to handle float value.

  2. JavaScript parseInt() Method - W3Schools

    The parseInt method parses a value as a string and returns the first integer. A radix parameter specifies the number system to use: 2 = binary, 8 = octal, 10 = decimal, 16 = hexadecimal. If …

  3. JavaScript Number parseInt() Method - GeeksforGeeks

    May 31, 2024 · The parseInt method parses a value as a string and returns the first integer. It accepts a string argument and optional radix parameter, defining the numeral system base. …

  4. parseInt() - JavaScript | MDN - MDN Web Docs

    The parseInt () function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems). A string starting with an integer. Leading whitespace …

  5. parseInt() in JavaScript – A Master Class Guide for Converting …

    To treat string values numerically, you must first explicitly convert them to numbers using a function like parseInt(). In JavaScript, string comparisons are based on Unicode lexicographic …

  6. The Complete Guide to parseInt() in JavaScript - Expertbeacon

    Sep 2, 2024 · The parseInt() function attempts to parse a numeric integer value out of a passed string: parseInt(string, radix); It scans the start of the string for valid digit characters:

  7. How to use numbers taken from prompt() and use in calculation?

    Sep 6, 2019 · parseInt() parseFloat() Generally you can use Number() method. Add a sum variable and store the sum result of the numbers to it. The code is given below: var numOne = …

  8. JavaScript Number parseInt() Method: Parsing Integer

    Feb 5, 2025 · The parseInt() method in JavaScript is a powerful tool for converting a string representation of a number into an integer. This function is essential for handling user inputs, …

  9. Converting to Integer with JavaScript parseInt() [Examples]

    Apr 23, 2021 · The JavaScript parseInt() function will convert a string type value to an integer type value, allowing you to specify the string’s format being parsed to help assist you in making …

  10. Mastering JavaScript’s ParseInt – A Complete Guide to Number …

    parseInt is a JavaScript function that allows you to convert a string into an integer. It takes a string as input and returns an integer based on the content of the string. If the string cannot be …

  11. Some results have been removed
Refresh