portfolio/src/main/webapp/script.js
/**
 * Adds a random fact about me.
 */
Adds a random fact about me.
Adds a random fact about me .
function addRandomFact() {
  const facts =
      ['I am new to web dev', 'I am an EE major', 'I speak french'];
  const randomFact = facts[Math.floor(Math.random() * facts.length)];
  const factContainer = document.getElementById('random-fact-container');
  factContainer.innerText = randomFact;
}
function addRandomFact ( ) { const facts = [ 'I am new to web dev' , 'I am an EE major' , 'I speak french' ] ; const randomFact = facts [ Math . floor ( Math . random ( ) * facts . length ) ] ; const factContainer = document . getElementById ( 'random-fact-container' ) ; factContainer . innerText = randomFact ; }
Adds a random fact about me.
Adds a random fact about me .
// Pick a random fact. // Add it to the page.