If we hide output then does command execute?

Hello i have an weird question -_-
actually, i want to execute linux command chattr
like chattr -i myfunc
if i write , = exec.Command(“chattr”,"-i",“myfunc”).Output()
then does this command execute or not?

The command still executes even if you don’t show its output.