Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Value isn't decrementing after failed attempts

 
Greenhorn
Posts: 7
Chrome Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Justyn,
How do you know it isn't decrementing? Is the variable used somewhere else? Or output somewhere?
 
Justyn Jackere
Greenhorn
Posts: 7
Chrome Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,

I've included a link to a video recording I just made that will hopefully answer
your question and shed a little more light on the problem I'm experiencing.
Thank you again in advance for your help.

[youtube]
https://youtu.be/cRHcTvmX3cE
[/youtube]
 
Marshal
Posts: 3144
465
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made a simple Plunker with your code and the attempts does in-fact decrement with each failed attempt.  Are you reloading the page after each attempt?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to be working for me. have you tried in another browser?
    Bookmark Topic Watch Topic
  • New Topic