Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added week 9/Israel/comments.md
Empty file.
15 changes: 15 additions & 0 deletions week 9/Israel/simplecounter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import $ from 'jquery'

const rootApp = document.getElementById('root')
rootApp.innerHTML = `<div id="mainArea">
<p>button count: <span id='btncount'>0</span></p>
<button id="mainButton" onClick="increment()">Increase</button>
</div>`
var count = 0
var button = document.getElementById('mainButton')
var number = document.getElementById('btncount')

button.onclick = function () {
count += 1
number.innerHTML = count
}
10 changes: 10 additions & 0 deletions week 9/Israel/simplecounter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
Author: Israel
Date: 2022-11-25
---

JavaScript Simple Counter

We provided some simple JavaScript code. Your goal is to modify the application so that the counter correctly displays and it increments by one whenever the button is pressed. You are free to add classes and styles, but make sure you leave the element ID's as they are.

Submit your code once it is complete and our system will validate your output.