I am creating a "Stone, Paper and Scissors" Game, I am in the final moment, but my code has an error that I can not identify.
var userChoice = prompt("Voce escolhe pedra, papel ou tesoura?");
var computerChoice = Math.random(1);
if (computerCh...
Hello, let's say I have an object that has the following values
var json = [
{"nome":"Coisa A", qtd:2},
{"nome":"Coisa A", qtd:3},
{"nome":"Coisa B", qtd:5},
{"nome":"Coisa B", qtd:7}
]
Well, I can return these value...
I was writing my js, when I come across the following error:
Uncaught TypeError: xyz is not a function
Released from code (shown simply):
(function () {
function abc() {
var xyz = xyz();
}
function xyz() {
co...
I need to calculate the present value equivalent to the Excel formula, I have the following data:
VP (2.5%; 48; -2052.50) that excel does not return me the value of 57,000.00 rounding down.
Can anyone help with this in javascript?
I tri...
Hello,
How do I show the date generated in the Brazilian format? I searched here and on the internet but could not execute as I need.
See:
$(document).ready(function () {
$("#button").click(function() {
var dias...
I have a code snippet where I want to get the value of option selected with JavaScript, and give alert with that value. However, every time it gives the value as undefined . I made a line to put in a input too, just to...
I have a solution that does the sum of values with respect to the value of a input check only if it is selected, but if you select the items from first to last, the sum is normally done but only the last input of the table the valu...