Posts by eleven08 • 65 points
5 posts
-
-4
votes1
answer86
viewsQ: How to add a text to an input via javascript?
I want to insert a text in the 2 image inputs but only via javascript with DOM manipulation. How do I do that?…
-
1
votes1
answer164
viewsQ: How to hide/show my HTML elements?
<ul> <li onclick="mostrar('img')"> PASTA - Fotos <ul> <li id="img" style="display: none;">Imagem1.jpg</li> <li id="img2" style="display: block;"> Imagem2.jpg…
-
5
votes3
answers387
viewsQ: Is there more than one way to use "if"?
const sequence = { _id: 1, get id() { return this._id++ } } const produtos = {} function salvarProduto(produto) { if (!produto.id) produto.id = sequence.id produtos[produto.id] = produto return…
-
-4
votes2
answers99
viewsQ: Why is my code giving Undefined?
Every time I try to run this code the result is always undefined. Explain to me the errors of this code and also help me with the possible solution. let tipo1 = prompt('') let tipo2 = prompt('') let…
javascriptasked eleven08 65 -
-1
votes2
answers50
viewsQ: Trying to print the total sum of all values within the list?
I’m trying to print the total sum of all the values inside the list, but what my code does is add the first element with the first element and give the result, then the second element with the…
javascriptasked eleven08 65