Is this really possible?

Try to write code that will work as JavaScript under Node.js AND as Java code AND as C# code also. The same file should output the string "test" when run via:
1) node
2) javac && java Task3
3) dotnet run

I am really stuck at this question and cant find the answer how to do please help me... I want to sleep at nights