Are the contents of .mcfunction files just minecraft commands?

I'm very new to datapacks, and I need some clarification about .mcfunction files in datapacks. Do they contain the same commands as you would type into a command block, but with the slash removed? i.e, if I typed a command into a command block, then copied and pasted it into a .mcfunction file and removed the slash, would it work? If this isn't the case, and functions are written in java or javascript or something, please could you provide a link to a wiki/documentation for possible functions?

(Note: im gonna be in my physics class for the next two hours, so I won't be aple to respond until 11:00am. Apologies in advance. )

Continue to help post