#Javascript Uncaught TypeError x is not a function when x is a function...

6 messages · Page 1 of 1 (latest)

tight valley
#
let array = ["a", "b", "c", "d", "e", "f", "g", "h"];
let ran = 0;
let x = "";

for (let i = 8; i > 0; i--) {
ran = parseInt(Math.random() * i) + 1
  x = array[ran];
  console.log(x);
  if (y > 8) {
      while (true) {
        let rand = parseInt(Math.random() * 9) + 1;
        idName = idNames[rand - 1];
        if (document.getElementById(idName).innerHTML == "") {
        Break;
        } // if
      } // while
  } else if (x() == false) {
    y++;
    delete array[ran];
    continue;
  } else {
    document.getElementById(idName).innerHTML = currentPlayer;
    return true;
  } // if
} // for

// functions a - h
spark harborBOT
#

This post has been reserved for your question.

Hey @tight valley! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

tight valley
#

Javascript Uncaught TypeError x is not a function when x is a function...

spark harborBOT
tight valley
#

i know but js server ppl aren't helping🥲