[RESOLVIDO] Erro NaN? Iniciante

Boa tarde!

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Workshop - Desafio</title>
    <link rel="stylesheet" type="text/css" href="css/desafio.css" />

  </head>
  <body>

    <label for="valor-hora">Valor Hora</label>
    <input type="number" id="valor-hora" />

    <label for="horas-projeto">Horas Projeto</label>
    <input type="number" id="horas-projeto" />

    <span id="resposta">Resposta</span>
    <button onclick="calcular()">Calcular Projeto</button>

    <a href="index.html">Voltar</a>
    <script type="text/javascript" src="js/desafio.js"></script>

  </body>
</html>

Tenho esse modelo de HTML pronto e preciso desenvolver o JS para fazer um cálculo para saber o valor total de horas trabalhadas

fiz esse js

var valorH = document.querySelector("#valor-hora")
var horasP = document.querySelector("#horas-projeto")
var resposta = document.querySelector("#resposta")

console.log(valorH)
console.log(horasP)
console.log(resposta)

function calcular() {
    var total = valorH.value * horasP
    console.log(total)
    resposta.textContent = total.toFixed(2)
}

mas o resultado retorna como NaN

vocês podem me ajudar por favor

No cálculo:

var total = valorH.value * horasP

O horasP é um elemento html e não um número válido.

O certo é:

var total = valorH.value * horasP.value;

vc esqueceu de definiri horasP como value

ai vc ta multiplicando um numero por um elemento html,
var total = valorH.value * horasP.value
tente assim

Mano valeu mesmo hein, arrumei deu certo

Mano valeu hein, arrumei e funcionou