portfolio/src/main/webapp/script.js
/**
 * Adds a random fact to the page.
 * @returns none
 */
Adds a random fact to the page.
@returns none
Adds a random fact to the page . @returns none
function addRandomFact() {
  const facts = [
    'I have two younger brothers both about a foot taller than me.', 
    'My parents are from Vietnam but I don\'t speak any Vietnamese.',
    'I have never been to anywhere else in Australia except Melbourne, \
    where I was born and raised.'
  ];
  const fact = facts[Math.floor(Math.random() * facts.length)];
  const factContainer = document.getElementById('fact-container');
  factContainer.innerText = fact;
}
function addRandomFact ( ) { const facts = [ 'I have two younger brothers both about a foot taller than me.' , 'My parents are from Vietnam but I don\'t speak any Vietnamese.' , 'I have never been to anywhere else in Australia except Melbourne, \
    where I was born and raised.' ] ; 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.