Java to JavaScript
Let convert some simple Java file to JavaScript!
Start file
public class VimGolf { public static void sayHello() { System.out.println("Hello VimGolf"); } public static void main(String []args) { sayHello(); } }
End file
class VimGolf { static sayHello() { console.log("Hello VimGolf"); } static main(args) { VimGolf.sayHello(); } } VimGolf.main([]);
View Diff
1c1 < public class VimGolf --- > class VimGolf 3,10c3,12 < public static void sayHello() < { < System.out.println("Hello VimGolf"); < } < public static void main(String []args) < { < sayHello(); < } --- > static > sayHello() > { > console.log("Hello VimGolf"); > } > static > main(args) > { > VimGolf.sayHello(); > } 11a14 > VimGolf.main([]);
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 71 remaining solutions by signing in and submitting your own entry
#72 Duy nguyễn / @Duycld03 - Score: 212 - 07/27/23 @ 18:34
df jjqqdwqjV10gg:noraml<BS><BS><BS>mal @q<CR>kiVimGolf.<Esc>>>kkbciw<Esc>xA<Esc>bbbbbbciw<BS><Esc>lxi<CR><Esc>f(ldt<Esc>df]<Esc>A<Esc>kjjjA<Esc>F;lDlllkkkkk0df<Esc>ddt<Esc>udt(iconsole.log9<Esc>x<Esc>jkkkbbciw<Esc>sx<BS><Esc>wwbciw<BS><Esc>lxi<CR><Esc>A<Esc>kkjVjjjjjjjjj><Esc>jjj>.>><Esc>jjjjjlyf.jjjo<Esc>pamain([]);<Esc>:wq<CR>
0 comments