Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions defining numbers in Java Script
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


samar
defining numbers in Java Script
1 Answer(s)      4 years and 2 months ago
Posted in : JavaScript Questions


Explain about defining numbers in Java Script?


Advertisement
View Answers

November 9, 2010 at 12:43 PM


Java Script represents numbers in the form of IEEE-754 doubles. This form of representation provides accuracy upto 14-15 significant digits. They represent fractions but not the decimal numbers to an extent. To perform explicit numeric conversion you can use Number constructor.

<script type="text/javascript">
function add(){
var a = "55";
var b = "45";
alert( Number(a) + Number(b) );
}
</script>


Related Tutorials/Questions & Answers:
defining numbers in Java Script
defining numbers in Java Script  Explain about defining numbers in Java Script
Defining a class - Java Beginners
Defining a class  A Keith number is an n-digit integer N>9 such that if a Fibonacci-like sequence (in which each term in the sequence is the sum...) displays all the Keith numbers between x and y(both inclusive
Advertisements
Java script
Java script  a java script code for accept 10 numbers from the user and print in the descending order without using sort method
Java Script
Java Script  why we are using java script
Java script
Java script  Source code for capturing the screen using Java Script
Java Script
Java Script  Hi, Any one please share a code to swap the 2strings using java script
Java Script
Java Script  What is Java Script? How to learn Java Script?   Hi Java Script is client side programming language. It runs on browser.... You can learn Java Script from our JavaScript - JavaScript Tutorial pages
java script
java script  Hi, Any one please tell me how, to store below elements in an array using java script 12,13,14,a,b,xyz
java script
java script  how to write a Java script program to enter number in two text fields and then automatically display the total in another text field
java script
java script  how will you identify whether the number entered... digit or two digit number.   <HTML> <HEAD> <SCRIPT... || charCode > 57)) { alert("This field accepts numbers only
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi Sir, The below java script code is not working in Google chrome can yo give me the solution as soon as possible. <script type="text/javascript"> function setValue(){ var val=""; var frm
java script
java script  write a java script code which provide a menu for user which will enable him/her to either add or subtract or multiply or divide two numbers and produce the corresponding result.   <html> <
Java Script
Java Script  Hello Sir, Is it possible to select only current date from datetimepicker in struts2 through java script validation. Means when i select.... Try to send me java script validation code for this purpose that user won't
how to add to numbers in java
how to add to numbers in java  how to add to numbers in java
Java Script.
Java Script.  The below code is nit working in Google chrome can any one tell me the solution as soon as possible. <script type="text/javascript"> <!-- function setValue(){ var val=""; var frm
Java Script.
Java Script.  Hi i want to submit two form using javascript.The below code submitting two forms in server but its not working in browser like chrome and firefox am struggling for many days give me solution as soon as possible
java script
java script  what is the use of getElementById() method in jsp. and give me its full knowledge with a example
java script
java script  I want to display set of radio buttons after i select one option of the combobox
java script
java script  when you click a button how will you change the background color of a web page
java script
java script  hi deepak, i have small doubt in the date ranges that when i select the date range then it display on the text boxes. example:suppose i select the weekly date range then the dates are display on the text boxes up
Java Script
Java Script  I want to display an error message for the validation of email at the top of the page in red font i want to use java scripts but i dont want to use alert box what i need to do   <html> <script>
prime numbers - Java Beginners
prime numbers  Write a java program to find the prime numbers between n and m
Perfect Numbers - Java Beginners
+ 2 + 3 Write a java program that finds and prints the three smallest perfect numbers. Use methods   Hi Friend, Try the following code: public
random numbers - Java Beginners
random numbers  write a program to accept 50 numbers and display 5 numbers randomly  Hi Friend, Try the following code: import...); System.out.println("Enter 10 numbers: "); for(int i=0;i<10;i
recursion numbers - Java Beginners
recursion numbers  I need to use recursion to test all values from 0 to 20 and see if they are contain in a 1-D array with values: 2,4,6,8,10,12,14,16,18,20. The results of all numbers from 0-20 will be printed
Generating random numbers in a range with Java
Generating random numbers in a range with Java  Generating random numbers in a range with Java
Java program - convert words into numbers?
Java program - convert words into numbers?   convert words into numbers?   had no answer sir
random numbers - Java Beginners
to display the random numbers, but not twice or more. I mean i need a number to be display once. This code allows some numbers to be displayed more than once. Hi... Scanner(System.in); System.out.println("Enter 10 numbers: "); for(int i=0;i<10;i
Advertisements
 

 

 

DMCA.com