After completing the warmup exercises, your task is to do four more slightly more challenges analyses.
var bodies = _.pluck(data.comments, 'body')
var food = _.map(bodies, function( item){return _.last(item.split('Food:'))})
var counter = 0
for(var i=0; i
The answer is 5.
var python = _.filter(data.comments, function(py){ return _.includes(py.body, "Python"); })
var bodiesPython = _.pluck(python, 'body')
var myArray = []
for(i=0; i
Their names are Name: William Farmer,Name: Heather Witte,Name: Zach Lamb,Name: Zhili Yang,Name: John Cronk,Name: Denis Kazakov,Name: Caleb Hsu,Name: Karen Blakemore,Name: Sanketh S Shetty,Name: Andrey Shprengel.
var bodies = _.pluck(data.comments, 'body')
var whichOne = _.map(bodies, function(item){return _.last(item.split('Language:'))})
var counterJava = 0
var counterScript = 0
for(var i=0; i counterScript)
return 'Java'
if(counterJava < counterScript)
return 'Javascript'
else return 'The same'
The answer is Java.
kjblakemore?var kjb = _.filter(_.pluck(data.comments, 'body'), function(text){return _.includes(text, 'Vegan')})
//console.log(kjb)
var names = _.map(kjb, function(n){return _.last(n.split('Name:'))})
var myArray = []
for(i=0; i
The people who like the same food as kjblakemore are: Karen Blakemore.