1 Replies - 548 Views - Last Post: 09 May 2013 - 03:36 AM

#1 AIintern  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 53
  • Joined: 06-June 12

Changing global variables?

Posted 09 May 2013 - 03:28 AM

I was wondering if there was a way to edit global variables in java script?

Let me explain..


the global variable =1


You have to pick a person..

If you select 1 person, the global varibale =2
and if you select another person the varible =3

if at the end of the forum the varable equals 2 or 3 something happens.
Is This A Good Question/Topic? 0
  • +

Replies To: Changing global variables?

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,239
  • Joined: 08-June 10

Re: Changing global variables?

Posted 09 May 2013 - 03:36 AM

View PostAIintern, on 09 May 2013 - 12:28 PM, said:

I was wondering if there was a way to edit global variables in java script?

that is the big problem with global variables, you can change them whereever, whenever you want (and too often you do it incidentally). a debugging nightmare.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1