diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/index.html b/index.html index c1f386e..5456966 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,10 @@
  • - + + + + diff --git a/script.js b/script.js index 2a00d3c..fec210f 100644 --- a/script.js +++ b/script.js @@ -1 +1,22 @@ -const frutas = ["laranja", "limão", "uva"]; \ No newline at end of file +const frutas = ["laranja", "limão", "uva", "banana"]; + + let fruta1 = document.getElementById("fruta-1") + fruta1.innerHTML = frutas[0] + + let fruta2 = document.getElementById("fruta-2") + fruta2.innerHTML = frutas[1] + + let fruta3 = document.getElementById("fruta-3") + fruta3.innerHTML = frutas[2] + + let fruta4 = document.getElementById("fruta-4") + fruta4.innerHTML = frutas[3] + + + function addFruta () { + const frutaDoInput = document.getElementById("fruta"); + const lista = document.getElementById("lista-de-frutas") + lista.innerHTML += `
  • ${frutaDoInput.value}
  • ` + frutaDoInput.value = "" + } + \ No newline at end of file