scrimba
Frontend Career Path
Making websites interactive
Chrome Extension
Push the value from the input field
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Push the value from the input field
AboutCommentsNotes
Push the value from the input field
Expand for more info
index.js
run
preview
console
let myLeads = []
const inputEl = document.getElementById("input-el")
const inputBtn = document.getElementById("input-btn")

inputBtn.addEventListener("click", function() {
// Push the value from the inputEl into the myLeads array
// instead of the hard-coded "www.awesomeleads.com" value
// Google -> "get value from input field javascript"
myLeads.push("www.awesomelead.com")
console.log(myLeads)
})


Console
/index.html
-2:27