portfolio/src/main/webapp/script.js
/**
 * Adds a random fact to the page.
 */
Adds a random fact to the page.
Adds a random fact to the page .
function addRandomFact() {
  const facts =
      ['I am the first member of my direct family to pursue CS', 'I am a dual citizen: American and Brazilian', 'I enjoy exploring new places', 'I hope to make a positive impact on the lives of many people', 'I am passionate about the FinTech space'];
  const fact = facts[Math.floor(Math.random() * facts.length)];
  const factContainer = document.getElementById('fact-container');
  factContainer.innerText = fact;
}
function addRandomFact ( ) { const facts = [ 'I am the first member of my direct family to pursue CS' , 'I am a dual citizen: American and Brazilian' , 'I enjoy exploring new places' , 'I hope to make a positive impact on the lives of many people' , 'I am passionate about the FinTech space' ] ; const fact = facts [ Math . floor ( Math . random ( ) * facts . length ) ] ; const factContainer = document . getElementById ( 'fact-container' ) ; factContainer . innerText = fact ; }
Adds a random fact to the page.
Adds a random fact to the page .
// Pick a random fact. // Add it to the page.