These are chat archives for FreeCodeCamp/Help

18th
Mar 2015
Paul C
@realPaulC
Mar 18 2015 02:20
function mutation(arr) {
  var first = arr[0].toUpperCase();
  var second = arr[1].toUpperCase().split("");
  var answer = 0;
  for (var i = 0; i < second.length; i++) {
   if ((first.search(second[i])) === (-1)) {
     answer -= 1;
   }
  }
  console.log(first.search(second));

  if (answer > -1) {
    return true;
  }
  else return false;
}

mutation(['Alien', 'line']);
anybody got a better way ? searching first element for letters in second element and returning false if there's a mismatch. not case-sensitive
Cristián Berríos
@crisberrios
Mar 18 2015 02:21
hmm
Paul C
@realPaulC
Mar 18 2015 02:21
console.log was me debugging
Cristián Berríos
@crisberrios
Mar 18 2015 02:22
logic seems pretty good
Paul C
@realPaulC
Mar 18 2015 02:22
the best thing ive learned from the bonfires so far (i think) is how to use the console to debug
Cristián Berríos
@crisberrios
Mar 18 2015 02:22
you could skip assigning an answer variable
then in the loop just return false if index is -1
and after the loop return true
you could also skip splitting the 2nd string
as you can still access characters using [i]
or also charAt(i)
Paul C
@realPaulC
Mar 18 2015 02:24
ah true
forgot about charAt()
what do you mean by if index is -i
-1 , i mean
Cristián Berríos
@crisberrios
Mar 18 2015 02:25
  if ((first.search(second[i])) === (-1)) {
     answer -= 1;
   }
could be replaced by return false
Paul C
@realPaulC
Mar 18 2015 02:25
gotcha
Cristián Berríos
@crisberrios
Mar 18 2015 02:25
if (answer > -1) {
    return true;
  }
  else return false;
by return true
Paul C
@realPaulC
Mar 18 2015 02:25
perfect. thank you, sir
Lazarus G.
@PseudoSsiah
Mar 18 2015 04:06
Anyone finish Seek and Destroy or Falsey Bouncer and think they have a good solid answer?
Cristián Berríos
@crisberrios
Mar 18 2015 04:07
I think I haven't done those
oh, falsey bouncer
it's easy :D
those 2 revolve around filter
and seek's objective is get to know the arguments object
Lazarus G.
@PseudoSsiah
Mar 18 2015 04:09
Filter?
Cristián Berríos
@crisberrios
Mar 18 2015 04:09
if you send me your answers I can tell if there's a better way
arr.filter(.....)
Lazarus G.
@PseudoSsiah
Mar 18 2015 04:09
Okay, that's what I'm looking for, I kind of did them the same way, but I'm sure there are better ways.
JMCQ87
@JMCQ87
Mar 18 2015 11:53
Hello everyone. Anyone around?
I am currently on Challenge 33. Does anyone know of some good additional material on regular expressions? I went through about half of the stuff there yesterday, will continue today, but so far, I can't say I really "get it".
Aza Noriega
@MegaGM
Mar 18 2015 12:19
@JMCQ87 I can't propose you good additional materials but there is a great tool for checking regexp on the fly https://www.debuggex.com/
and cheatsheet https://www.debuggex.com/cheatsheet/regex/javascript
Paul C
@realPaulC
Mar 18 2015 19:35
can anyone help explain what this bonfire is asking?
function where(collection, source) {
  var arr = [];
  // What's in a name?
  return arr;
}

where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });
"Make a function that looks through a list (first argument) and returns an array of all objects that have equivalent property values (second argument)."
Aza Noriega
@MegaGM
Mar 18 2015 19:36
Go to Teamspeak :)
Paul C
@realPaulC
Mar 18 2015 19:36
function where(collection, source) {
  var arr = [];
  // What's in a name?
  return arr;
}

where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' });
ah it wont past the whole thing
@MegaGM whats Teamspeak?
Aza Noriega
@MegaGM
Mar 18 2015 19:38
They want from you to pick up from collection only those objects that has property last 'Capulet'
Paul C
@realPaulC
Mar 18 2015 19:38
ok got it
thanks
Aza Noriega
@MegaGM
Mar 18 2015 19:39
@pcigolini Teamspeak it's just like Skype or Mamble or Ventrilo
Nathan
@terakilobyte
Mar 18 2015 19:51
what teamspeak?
Aza Noriega
@MegaGM
Mar 18 2015 20:05
@terakilobyte It's a tool for VoIP, just like Skype but with plenty of differences
Nathan
@terakilobyte
Mar 18 2015 20:06
I know what it is, and it’s rather low quality compared to some of the alternatives imo
Darryl Dixon - Piece Digital
@piecedigital
Mar 18 2015 20:07
I think Ventrillo does most of the same things but uses less resources.
Nathan
@terakilobyte
Mar 18 2015 20:07
I meant what teamspeak as in what teamspeak are people going to?
Aza Noriega
@MegaGM
Mar 18 2015 20:15

@terakilobyte Perhaps you're right, but personally I prefer TS rather than Skype.

I meant what teamspeak as in what teamspeak are people going to?

there was a question

can anyone help explain what this bonfire is asking?

and I invited @pcigolini to come to my Teamspeak server

Nathan
@terakilobyte
Mar 18 2015 20:17
@MegaGM it would have been nice if the explanation had been publicly visible inc ase someone else was having an issue and didn’t want to pipe up
and skype is in a category of service a bit different than TS. I’d put ventrilo and mumble in there, both of which have a better ui imo. Getting on teamspeak reminds me of logging into muds for some reason
Aza Noriega
@MegaGM
Mar 18 2015 20:30
@terakilobyte okay.
Nathan
@terakilobyte
Mar 18 2015 20:31
however if you have a group of people doing FCC that is awesome, please keep using it
just remember not everyone can join your TS and we all benefit from knowledge
Aza Noriega
@MegaGM
Mar 18 2015 20:41

@terakilobyte I have no group, we just were in TS with @bconner22 and went thru some Bonfires today. It was awesome btw, thanks alot @bconner22

@terakilobyte I'm on Linux therefore I cannot use Screen Hero ('cuz it's for Mac and Win only), so I use Teamviewer + Teamspeak instead of Screen Hero.

Darryl Dixon - Piece Digital
@piecedigital
Mar 18 2015 21:30
This message was deleted