citizen_hacks_2019_part2
For the Citizen Hacks 2019 Vim competition
Start file
// Part 2: Assembling the Team // assembling friends let new_members = ['Daniel', 'Curtis', 'Michael'] add_members(group, new_members) let fs = require('fs') let october_diary = JSON.parse(fs.readFileSync('October_2019.json', 'utf8')) october_diary['school'] = True october_diary['free_time'] = 'rip' october_diary['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick', 'Audrey', 'Mirjana'] add_members(group, october_diary.new_friends) let team = new CitizenHacks(group) team.publish_website()
End file
// Part 2: Assembling the Team // Assembling Friends let new_members = ['Daniel', 'Curtis', 'Michael', 'Audrey', 'Mirjana']; add_members(group, new_members); let fs = require('fs'); let october = JSON.parse(fs.readFileSync('October_2019.json', 'utf8')); october['school'] = true; october['free_time'] = 'rip'; october['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick']; add_members(group, october.new_friends); let team = new CitizenHacks(group); team.publish_website();
View Diff
3,5c3,5 < // Assembling Friends < let new_members = ['Daniel', 'Curtis', 'Michael', 'Audrey', 'Mirjana']; < add_members(group, new_members); --- > // assembling friends > let new_members = ['Daniel', 'Curtis', 'Michael'] > add_members(group, new_members) 7,8c7,8 < let fs = require('fs'); < let october = JSON.parse(fs.readFileSync('October_2019.json', 'utf8')); --- > let fs = require('fs') > let october_diary = JSON.parse(fs.readFileSync('October_2019.json', 'utf8')) 10,13c10,13 < october['school'] = true; < october['free_time'] = 'rip'; < october['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick']; < add_members(group, october.new_friends); --- > october_diary['school'] = True > october_diary['free_time'] = 'rip' > october_diary['new_friends'] = ['Adam', 'Ahmed', 'Ethan', 'Hrithvik', 'Manvi', 'Sherwin', 'Atif', 'Nick', 'Audrey', 'Mirjana'] > add_members(group, october_diary.new_friends) 15,16c15,16 < let team = new CitizenHacks(group); < team.publish_website(); \ No newline at end of file --- > let team = new CitizenHacks(group) > team.publish_website() \ No newline at end of file
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 9 remaining solutions by signing in and submitting your own entry