inputBtn.addEventListener("click", function(){
myLeads.push(inputEl.value)
inputEl.value = ""
let linksFromLocalStorage = localStorage.getItem("Leads")
localStorage.setItem("Leads", JSON.stringify(myLeads))
render(myLeads)
})
function render(Leads){
let listItems = ""
for(i = 0; i < Leads.length; i++){
listItems += `
<li>
<a href='${Leads[i]}' target='_blank'>
${Leads[i]}
</a>
</li>`
}
ulEl.innerHTML = listItems
}
I have written these two codes but whenever I input a link for example "www.google.com" and then click on the link it does not go to google.com. It shows an error "ERR_FILE_NOT_FOUND" Does anybody know how I can fix this? I am really new to Javascript and HTML and would appreciate any help. Thanks in advance