www.webdeveloper.com
Results 1 to 3 of 3

Thread: Dumb Question about Math

Hybrid View

  1. #1
    Join Date
    Mar 2013
    Posts
    2

    Dumb Question about Math

    alert(('55' - 22) / '11' + '2')

    So in the case it would fall out to:

    33 / 112 = 0.2946 ?

    I'm told the answer to this is 32. I can't see that and sorry for the post but I am trying to learn Javascript on my own. My math might be worse than I thought possible.

  2. #2
    Join Date
    Mar 2013
    Posts
    2
    Nevermind.

    55-22 = 33 / 11 = 3 + '2' = 32.

  3. #3
    Join Date
    Nov 2002
    Location
    Flint, Michigan, USA
    Posts
    593
    If you had added parenthesis around the denominator, you would have gotten the result that you had expected:
    Code:
    alert(('55' - 22) / ('11' + '2'))
    Please give me a hand at http://www.gofundme.com/bkzr98.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles