Switch function arguments
How to switch two arguments of a function.
Start file
function testFunction (foo, bar) {
}
End file
function testFunction (bar, foo) {
}
1c1
< function testFunction (foo, bar) {
---
> function testFunction (bar, foo) {
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock
626 remaining solutions by
signing in and submitting your own entry
#627
🎱 Josh Branchaud 🔥 / @jbrancha -
Score: 63 -
08/24/16 @ 01:02
:s<BS><BS>ffvi(:s/\w{3}, <BS><BS><BS><BS><BS><BS>(\w*\), \w<BS>(\w*\)\\2, <BS><BS><BS><BS><BS>/\2, \1/<CR>ZZ
0 comments
627 active golfers, 1982 entries
Leaderboard (lowest score wins):
03/15/2016 at 02:31PM
04/05/2016 at 12:24PM
05/15/2016 at 07:01AM
05/25/2016 at 03:40AM
06/08/2016 at 08:25PM
06/29/2016 at 01:22PM
10/12/2016 at 02:18AM
11/27/2016 at 02:07AM
11/30/2016 at 12:38PM
12/31/2016 at 12:21AM
02/25/2017 at 07:30AM
03/23/2017 at 12:00AM
03/31/2017 at 06:03AM
06/13/2017 at 12:56AM
06/30/2017 at 09:19PM
07/20/2017 at 03:06PM
02/03/2018 at 12:30PM
06/07/2018 at 03:43AM
06/23/2018 at 09:56AM
07/20/2018 at 08:01PM
07/25/2018 at 04:47PM
09/09/2018 at 07:24PM
09/11/2018 at 11:24AM
09/14/2018 at 09:28AM
#295 - Kasparas Lavrukaitis / @kaslvr
11/09/2018 at 03:54PM
11/18/2018 at 06:58PM
12/08/2018 at 01:04PM
12/19/2018 at 12:59AM
02/15/2019 at 04:25AM
07/29/2019 at 12:23AM