First of all I am not using any kind of subversion file, any Git, any TFS.
I would like to recover a function I moved yesterday to another file and it accidentally got deleted.
Is it possible to recover that function?
It is a JavaScript file.
Unless you have a backup of the file (eg. in recycle bin) then: No.
Learn a lesson: version control is very important, use it even on your smallest personal projects.