let tituloPrincipal = document.querySelector ("h1");
tituloPrincipal.innerHTML = "TIME OF CHALLENGE";
let tituloSecundario = document.querySelector ("h2");
tituloSecundario.innerHTML = "Welcome";
let tituloTercero = document.querySelector ("h3")
tituloTercero.innerHTML = ("We're the best");
function asignarTextoElemento (elemento, texto) {
let elementoHTML = document.querySelector(elemento);
elementoHTML.innerHTML = texto;
}
function functionConsole () {
alert ("You clicked on that button.");
}
alertAlert
function alertAlert () {
alert ( "I love JS");
}
function clickSuma (){
const num1 = parseInt(prompt ("Enter the first number: "));
const num2 = parseInt(prompt ("Enter the second number: "));
function sumar (num1, num2)
{
let resultado
resultado = num1 + num2
return resultado
}
alert ("The sum of the numbers is: " + sumar(num1, num2))
console.log (sumar(num1, num2));
}
function clickPrompt() {
let ciudad = prompt ("In which city did you spend your summer vacation?")
alert(`Awesome! The next time I visit ${ciudad}, I'll think of you.`);
}
asignarTextoElemento("h4","Hi!");
asignarTextoElemento("h5","Button test in JavaScript");
asignarTextoElemento("h6","This is a level 6 heading");``