javascript can i make two promise inside one function code example

Example 1: can you do a join() in js without the commas

arr.join("")

Example 2: How can I do a foreach loop for an array of booleans

// The problem is not that your array is boolean,
 // it is that you are trying to assign value to buttonBoolean in foreach loop. It is read-only as every foreach iteration variable is
 
 // You could do this instead:
 
 public bool[] inputBool;
      
     for(int i = 0; i < inputBool.Length; i++) {
       inputBool[i] = false;
     }