473,513 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

parsInt in Javascript

1 New Member
I am confused. Can somebody tell me what will be the answer to parsInt(12.3)?
Jul 8 '07 #1
2 4186
pbmods
5,821 Recognized Expert Expert
Heya, pree. Welcome to TSDN!

Expand|Select|Wrap|Line Numbers
  1. parseInt(12.3)
will evaluate to Number(12).

For more info, check out this article.

[EDIT: Moving to JavaScript....]
Jul 8 '07 #2
gits
5,390 Recognized Expert Moderator Expert
@pbmods:

yep ... very good link ...


@pree:

parseInt is used to evaluate a string-value to an integer-value ... when you put in a 'floating-point number' ... you will get the number before the dec-point ... what did you expect? i guess you have a string-value of '12.3' ... what do you want to do with it?

kind regards
Jul 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
7260
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7527
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3223
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.