File diff 99c74f1ccc26 → d32a609defde
static/src/js/lot_word.js
Show inline comments
 
new file 100644
 
function loeWord() {
 
  var wordlist = ["health", "environment", "security", "communication", "people",];
 
  var target = document.getElementById("word");
 

	
 
  function getRandomInt(max) {
 
    return Math.floor(Math.random() * Math.floor(max));
 
  }
 

	
 
  function setWord() {
 
    target.innerText = wordlist[i%wordlist.length]
 
    i += 1;
 
  }
 
  var i = getRandomInt(wordlist.length);
 

	
 
  setWord()
 
  setInterval(setWord, 5000)
 
};
 

	
 
loeWord();
...
 
\ No newline at end of file