63298322

Date: 2020-08-07 09:48:27
Score: 5
Natty:
Report link

Please where can I put this code in wordpress? I have tried adding it in function.php and custom. Js but not working. Please help

var facts = ["1", "2", "3"];

!function newFact() {
  var randomFact = Math.floor(Math.random() * facts.length);
  document.getElementById('factDisplay').innerHTML = facts[randomFact]
}();
<div id="factDisplay"></div>

Reasons:
  • Blacklisted phrase (1): But not working
  • RegEx Blacklisted phrase (3): Please help
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Arije