Does anyone know how I would go about reducing the following line of code to somehow include "4, 5, 6, 7, 8" into a single...thingy?
I've already tried the following to no avail...
I've already tried the following to no avail...
var checkIds = [4, 5, 6, 7, 8];
var cond = false;
for (var i ; i < checkIds.length ; i++) {
if (this.getItemElements().contains(checkId[i]) {
cond = true;
break;
}
}
if (cond) {
// whatever happens when the condition is true;
else {
// whatever happens when the condition is false;
}
I need something that does:
I'm trying to construct an IF statement that returns TRUE if the element(s) from the damage in question contains at least an element from each array. Basically...
Thank you all for your time, I greatly appreciate it!
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-simplify-condense-this.102757/