mirror of
https://github.com/viatsko/awesome-vscode.git
synced 2024-12-26 15:49:37 -05:00
14 lines
250 B
JavaScript
14 lines
250 B
JavaScript
|
const btn = document.getElementById('btn')
|
||
|
let count = 0
|
||
|
|
||
|
function render() {
|
||
|
btn.innerText = `Count: ${count}`
|
||
|
}
|
||
|
|
||
|
btn.addEventListener('click', () => {
|
||
|
// Count from 1 to 10.
|
||
|
if (count < 10) {
|
||
|
count += 1
|
||
|
render()
|
||
|
}
|
||
|
})
|