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 world!', 'Math makes me tingle inside', 'Black Lives Matter', 'I support merging postal and banking services'];
  const greeting = greetings[Math.floor(Math.random() * greetings.length)];
  const greetingContainer = document.getElementById('greeting-container');
  greetingContainer.innerText = greeting;
}
function addRandomGreeting ( ) { const greetings = [ 'Hello world!' , 'Math makes me tingle inside' , 'Black Lives Matter' , 'I support merging postal and banking services' ] ; const greeting = greetings [ Math . floor ( Math . random ( ) * greetings . length ) ] ; const greetingContainer = document . getElementById ( 'greeting-container' ) ; greetingContainer . innerText = greeting ; }
Adds a random greeting to the page.
Adds a random greeting to the page .
// Pick a random greeting. // Add it to the page.