is there any way to use variables in /tp command?

my idea is to remember the last coordinates of player and tp them to these coords later then function is called

Continue to help post