Posts by Zano • 21 points
2 posts
-
1
votes2
answers53
viewsA: What is the error in the script to generate the calculation?
The error of your question is in assigning the result in a Element that you did not declare. I’ll pass the correction: function somar(){ var entrada = window.document.querySelector("#entrada"); var…
javascriptanswered Zano 21 -
1
votes0
answers37
viewsQ: Javascript: method as object builder?
I would like to create a method within an object, but it assigns the properties to the object itself: Game = { personagens: [] }; Game.Personagem = function(obj = {}){ this.nome = obj.nome ||…