The entropy is a state function because it depends on the final and initial state of the process.
It does not depend on the path by which the process is completed.
For example, entropy change for a reversible process is the same when the same process undergoes an irreversible manner but for work and heat, it is not the same because entropy is a state function and work and heat are path functions.