If you need to reuse the reuse the last argument from the previous command this is for you:

touch config.js
vi !$

Last command is equivalent to

vi config.js

Bonus: echo $? will display the exit code of therevious command !! will re-execute the previous command, sudo !!