Skip to content

Commit

Permalink
change actions periority
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sabagh committed Jan 22, 2023
1 parent 19ff60d commit 8dcd23d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ export default class {
let panel = document.querySelector('.panel')
new Promise((resolve,reject)=>{
const interval = setInterval(()=>{
panel.innerHTML = counter
counter--
if(counter <= 0){
clearInterval(interval)
panel.innerHTML = ''
resolve('done')
}
panel.innerHTML = counter
counter--
},1000)
}).then((result)=>{
panel.innerHTML = ''
let items = [rock,paper,scissor]
let img = document.createElement('img')
img.src = items[Math.floor(Math.random()*items.length)]
Expand Down

0 comments on commit 8dcd23d

Please sign in to comment.