can digitalwrite take arguemnts that are not LOW or HIGH?

I understood that that digitalwrite() function could only take HIGH or LOW as arguments.

I’m looking that the code behind shiftout() and the argument is !!(val & (1 << i))).

What is happening here? For example if I called this, what happens the 0b00000011 in the first iteration of the for loop?

int _gTempCmd  = 0b00000011;
shiftOut(_dataPin, _clockPin, MSBFIRST, _gTempCmd );
 void shiftOut_function(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val)
      uint8_t i;

      for (i = 0; i < 8; i++)  {
            if (bitOrder == LSBFIRST)
                  digitalWrite(dataPin, !!(val & (1 << i)));
                  digitalWrite(dataPin, !!(val & (1 << (7 - i))));
            digitalWrite(clockPin, HIGH);
            digitalWrite(clockPin, LOW);            

digitalWrite() is not limited to HIGH and LOW as parameters but it will always behave as if those were the parameters and turn the pin either HIGH or LOW. A value of 0 will be interpreted as LOW and any other value will be interpreted as HIGH.

In the code you posted you will note the use of !! which causes the value that it is applied to to be converted to 0 or 1