simple Question about if statment and GUI

Hello

i am studying some codes now and i found that the writer always write this code:

if(GUI.Button(Rect(currentX,currentY,itemIconSize.x,itemIconSize.y),item.itemIcon))

what does that code mean? i mean when you write if and put GUI.Button inside the condition

GUI.Button returns true when it is pressed. So wrapping it in an if() statement allows you to specify what should happen when the button is clicked.

It’s all explained in the manual: Unity - Manual: IMGUI Basics