Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Javascript calculator issues

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been assigned a javascript calculator and am having difficulties getting it to work. I would think that it is a fairly easy assignment but I seem to be struggling with it. I have included the code, but what seems to be my first problem is the fact that it isn't storing the global variables the way I would think. I need the top three variables to continue throughout the page just not between functions. I don't know exactly how to explain it, but what I would like it to do is keep the storedNum and update it with every key click. Any ideas or maybe pointing me in the right direction would help. Thanks in advance

Tony
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
there are more resources you will find in google.
This is basic one.
Basic Calculator
thank you
 
Tony VanHorn
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did google for the answer first, as I know how frustrating finding an answer for somebody's question with in the first two or three results. However, I went through two or three pages and didn't see an answer, all I saw were solutions. As this is for a class in school, I need to know how to do it. I will look at the solution you gave me, and see if that answers any questions. Thanks

Tony
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Download Firefox and than http://www.getfirebug.com/

That will help you figure out what the errors are.

Eric
 
reply
    Bookmark Topic Watch Topic
  • New Topic