I am new to writing bash scripts, so I can't understand how to fix (remove) consoling of stuff that are inside if statement (see code below). Could someone tell me why it does stuff like that?
if pgrep "Electron" -n
then
killall Electron
else
echo "Visual Studio Code is already closed"
fi