digitalWrite Code explanation

I'm looking for a code to alert via buzzer if an ultrasonic sensor senses any objects within 80cm, Then I found code in the internet as shown below:

if (distance < 20)
digitalWrite(buzzer, (20 - distance)*10

I didnt understand the code inside the digitalWrite which says (20 - distance)*10

Please could anyone help to tell me what does that code does

Thanks.

Basically the closer you get, the quitter the alarm gets, but it should not be using digitalWrite. Instead it should be using analogWrite and a pin that supports PWM.

Thank you

digitalWrite(buzzer, (20 - distance)*10

The closing ) should be to the right of the 10 (or the *10 should be deleted)

...R

That code is total tosh.
It will not compile and has no terminating ;
With digital write you can only write high or low to a pin.
the code should / could be:-

if (distance < 20)  // if the distance is less than 20
digitalWrite(buzzer, HIGH); // then turn on the buzzer