citizen_hacks_2019_part4
For the Citizen Hacks 2019 Vim competition
Start file
// Part 4: Contacting Sponsors const request = require('request'); // Talking to sponsors let request_sponsorship = (company_name) => { // remove request(company_name + 'sponsorship_emails', (err, res, reply_body) => { // remove if(response.statusCode != 200){ // remove console.log(`${company_name} couldn't sponsor us with error:`); // remove console.log(err); // remove return; // remove } // remove if(details_fuzzy(reply_body)){ // remove team.coordinate_specifics(); // remove } // remove }); // remove }; let details_blurry = (reply) => { if(reply.sponsorship_tier == null or reply.reply_contract == 'not_signed' or reply.deliverables = undefined){ return true; } return false; }
End file
// Part 4: Contacting Sponsors const request = require('request'); // Talking to sponsors let request_sponsorship = (company_name) => { request(company_name + 'sponsorship_emails', (err, res, reply_body) => { if(response.statusCode != 200){ console.log(`${company_name} couldn't sponsor us with error:`); console.log(err); return; } if(details_fuzzy(reply_body)){ team.coordinate_specifics(); } }); }; let details_fuzzy = (reply) => { if(reply.sponsorship_tier === null or reply.reply_contract === 'not_signed' or reply.deliverables === undefined){ return true; } return false; }
View Diff
6a7 > // remove 7a9 > // remove 8a11 > // remove 9a13 > // remove 10a15 > // remove 11a17 > // remove 12a19 > // remove 13a21 > // remove 14a23 > // remove 15a25 > // remove 16a27 > // remove 19,22c30,31 < let details_fuzzy = (reply) => { < if(reply.sponsorship_tier === null or < reply.reply_contract === 'not_signed' or < reply.deliverables === undefined){ --- > let details_blurry = (reply) => { > if(reply.sponsorship_tier == null or reply.reply_contract == 'not_signed' or reply.deliverables = undefined){
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 10 remaining solutions by signing in and submitting your own entry