Message from JavaScript discussions

April 2019

— So should i insert the text under the same div?


Guys.Good day.

I need to develop a voting system that can be installed on computer and control by the admin itself without the developer being around.

Any help or which language is best for that?

— Guys I have a question

— If I want to update a variable I first declare it and later when I call a function I can update it's value, I tried to do the same with an object made from contractor and it didn't work

Message permanent page

— admin ban

— Show code

— After declaring that new object I called a method and the method changed the variable internally but it didn't update that object

Message permanent page

— Right away...

— Class Game {
constructor(pace, money){
this.hour = (a) =>{
a = Math.floor(this.startTime/60)
return (a > 23) ?a = 0 :a
this.minute = (a) => {
a = this.startTime%60
return (a < 10) ?'0'+a :a }
this.startTime = 464;
this.pace = pace; = money; //12
this.interval = null;
this.process = null;
return this.hour() +':'+this.minute()
return this.startTime++
this.interval = setInterval(()=>{
return this.startTime}, 1000)
return clearInterval(this.interval)


const newGame = new Game(1000, 10000);
const test =()=>newGame.pause()
setTimeout(test, 8000)

Message permanent page

— This code generates a fake time and when you call it shows everything well

— But when you check the new game.startTime it doesn't update

— So what do you think?