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 by @alexandregv:
Unlock 1 remaining solutions by signing in and submitting your own entry