portfolio/src/main/webapp/script.js
/**
 * Adds a random greeting to the page.
 */
Adds a random greeting to the page.
Adds a random greeting to the page .
function addRandomGreeting() {
    const greetings =
        ["Hello, you look cute today. Lets be cute together!", "¡Hola Mundo! Soy Dominicano", "你好，世界！<3 ", "Bonjour le monde! Je t'aime "];
    const greeting = greetings[Math.floor(Math.random() * greetings.length)];
    const greetingContainer = document.getElementById('greeting-container');
    greetingContainer.innerText = greeting;
    scareUser();
    askIfScared();
}
function addRandomGreeting ( ) { const greetings = [ "Hello, you look cute today. Lets be cute together!" , "¡Hola Mundo! Soy Dominicano", 你好，世界！<3 ", "Bonjour le onde! Je t'aime "]; const greeting = greetings [ Math . floor ( Math . random ( ) * greetings . length ) ] ; const greetingContainer = document . getElementById ( 'greeting-container' ) ; greetingContainer . innerText = greeting ; scareUser ( ) ; askIfScared ( ) ; }
Adds a random greeting to the page.
Adds a random greeting to the page .
// Pick a random greeting. // Add it to the page.