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):
12/17/2015 at 06:34PM
02/11/2016 at 12:08AM
02/28/2016 at 06:38PM
08/24/2016 at 11:08PM
02/23/2017 at 10:58AM
09/29/2017 at 05:32PM
09/26/2018 at 11:01PM
11/29/2018 at 02:12AM
12/14/2018 at 07:46AM
11/24/2019 at 11:27PM
06/08/2012 at 09:10AM
06/09/2012 at 04:23AM
06/18/2012 at 06:49PM
06/19/2012 at 09:58PM
07/13/2012 at 11:05PM
07/14/2012 at 10:28AM
07/18/2012 at 05:55PM
07/26/2012 at 01:17AM
08/12/2012 at 09:48AM
08/26/2012 at 05:48PM
11/27/2012 at 08:07PM
01/16/2013 at 09:29PM
01/22/2013 at 09:13PM
05/08/2013 at 08:47PM
07/04/2013 at 12:50PM
07/15/2013 at 09:52PM
#567 - Dr Rev J. “I am not a bot!” Kirchartz, KSC, KHS / @JKirchartz
07/25/2013 at 03:05AM
10/13/2013 at 10:57AM
12/20/2013 at 11:47PM
01/18/2014 at 12:54PM