These are chat archives for FreeCodeCamp/Help

21st
Aug 2017
Long Nguyen
@longnt80
Aug 21 2017 00:31
@artoodeeto sorry, I was out
bitcoinabdi
@bitcoinabdi
Aug 21 2017 01:58
good evening guyz
quick question how do I transform a JS code into React code?
any help is highly appreciated
Gorden_x
@Gordenx
Aug 21 2017 02:27
image.png
kryssxx
@kryssxx
Aug 21 2017 02:36
Hi all, can someone help explain why this loop isn't printing?

var counter = 1;
var candidates = 1;
while (counter<=1000 && candidates % 2 ===0) {
console.log(candidates);
counter++;
candidates++;
}

console.log(candidates);

var num = 1;
var maxNum = 1000;
if (num <=1000) {
console.log(num % candidates === 0);
console.log(num);
num++;
}

Kevin Toro
@akrios25
Aug 21 2017 02:38
hey if anyone knows Java, I'm trying tomake a verbosity calculator that counts words and sentences and returns a double that should be the quotient of sentences and words. I have to use a scanner to scan through a text file and do this
if anyone can help, I'd like to send what I have.
Manish Giri
@Manish-Giri
Aug 21 2017 02:44
@akrios25 I can take a look..
Ken Haduch
@khaduch
Aug 21 2017 03:04

@kryssxx - this was posted a while ago :point_up: August 20, 2017 10:36 PM - did you figure it out?
You will only enter the while loop while counter <= 1000 and candidates %2 === 0. When you initialize both of those to 1, you meet the first condition, but fail the second one, so it never enters the loop and doesn't increment the counter or the candidates. So one time and that loop stops. Actually never really executes. If you want to print the even numbers, then you could loop like this:

var counter = 1;
var candidates = 1;
while (counter<=1000) {
    if (candidates % 2 === 0) {
        console.log(candidates);
    }
    counter++;
    candidates++;
}

but since counter and candidates will always have the same values, you could use just one of the variables.

Mukesh Kumar Angrish
@MukeshAngrish
Aug 21 2017 03:09
@artbohr Thanks mate. That magically worked. Don’t know what was wrong with this one that I tried earlier
$("#timer").on("click", function() {
  $(".row").hide();
  sessionTime *= 60; 
  var sessionTimer = setInterval(sessionCount, 1000);

  function sessionCount() {
    $("#status").html("Session");
    sessionTime -= 1;
    $("#timer").toggleClass("timer-border-green");
    $("#timer").toggleClass("timer-border-yellow");
    if(sessionTime % 60 >= 10)
      showStr = Math.floor(sesionTime / 60) + ":" + (sessionTime % 60);
    else
      showStr = Math.floor(sesionTime / 60) + ":0" + (sessionTime % 60);
CamperBot
@camperbot
Aug 21 2017 03:09
mukeshangrish sends brownie points to @artbohr :sparkles: :thumbsup: :sparkles:
:cookie: 305 | @artbohr |http://www.freecodecamp.com/artbohr
Ken Haduch
@khaduch
Aug 21 2017 03:10
@MukeshAngrish - it looks like you have two different spellings of sessionTime and sesionTime in that code that you posted.
Ginger
@GingerChew
Aug 21 2017 03:11
Hey all, can I get a second look at my code? I just want to see if there's anything I can improve on? Or anything new to learn and try out

function convertHTML(str) {
  var regAnd = /&/gi,regLCarat = /</gi,regRCarat = />/gi, regQuot = /"/gi, regApos = /'/gi, regArray = [regLCarat,regRCarat,regQuot,regApos],outputArray = ['&lt;','&gt;','&quot;','&apos;']; 
  var newStr = str.replace(regAnd,'&amp;');
  for (var i=0;i<regArray.length;i++) {
    newStr = newStr.replace(regArray[i],outputArray[i]);
  }
  return newStr;
}

convertHTML("Dolce & Gabbana");
Mukesh Kumar Angrish
@MukeshAngrish
Aug 21 2017 03:11
@khaduch Ahaan! So that typo was not letting it work. Did see that. Thanks
CamperBot
@camperbot
Aug 21 2017 03:11
mukeshangrish sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3223 | @khaduch |http://www.freecodecamp.com/khaduch
goldenboy11
@goldenboy11
Aug 21 2017 03:12
hello, i have an issue with replacing href with hash symbol in order to create dead link, please help me
Ginger
@GingerChew
Aug 21 2017 03:12
@goldenboy11 href='#'
so <a href='#'></a>
goldenboy11
@goldenboy11
Aug 21 2017 03:14
@GingerChew thank you
CamperBot
@camperbot
Aug 21 2017 03:14
goldenboy11 sends brownie points to @gingerchew :sparkles: :thumbsup: :sparkles:
:cookie: 280 | @gingerchew |http://www.freecodecamp.com/gingerchew
Ken Haduch
@khaduch
Aug 21 2017 03:14
@goldenboy11 - @GingerChew is correct, that's the syntax for that. <a href='#'>dead link</a>
goldenboy11
@goldenboy11
Aug 21 2017 03:15
@khaduch @GingerChew thank you guys
CamperBot
@camperbot
Aug 21 2017 03:15
goldenboy11 sends brownie points to @khaduch and @gingerchew :sparkles: :thumbsup: :sparkles:
:warning: goldenboy11 already gave gingerchew points
:star2: 3224 | @khaduch |http://www.freecodecamp.com/khaduch
Albert Cardona II
@daddycardona
Aug 21 2017 03:20
hey yall what exactly is chai?
not the tea funny people :)
Ken Haduch
@khaduch
Aug 21 2017 03:39
@daddycardona - what is the context for this "chai"?
@daddycardona - could it be this one ? a Node.js package for testing, it looks like?
Albert Cardona II
@daddycardona
Aug 21 2017 03:40
I was looking at a video and it was talking about chai but the video was about reduce map and filter methods
Ken Haduch
@khaduch
Aug 21 2017 03:41
@daddycardona - do you know where (what time) in the video this pops up?
Albert Cardona II
@daddycardona
Aug 21 2017 03:41
So I am trying to do Wherefore art thou
yes in the very begining
@khaduch
it says it in on the top of the video
or is written on the top of the javascript
Ken Haduch
@khaduch
Aug 21 2017 03:44
@daddycardona - I don't see the "chai" anywhere in there? At least not in the first couple minutes... still watching.
Albert Cardona II
@daddycardona
Aug 21 2017 03:44
I saw the site it is for testing TDD and BDD so like I read about it
Look on the top of the code it says `const {expect} = required('chai')
1
const {expect} = required('chai')
Ken Haduch
@khaduch
Aug 21 2017 03:46
@daddycardona - oh, yes, I just saw it. It's just a way of writing tests that verify that your code is correct. I don't really know how to use it - it was not introduced at any point in the FCC lessons.
Albert Cardona II
@daddycardona
Aug 21 2017 03:49
the funny thing there are a lot cool testing I just say like should include I just heart about it right now but it is constantly paired with mocha in all the videos
but it seems cool
@khaduch
Ken Haduch
@khaduch
Aug 21 2017 03:51
yeah, putting test code in place is a good thing. You would not be able to use it directly on the freeCodeCamp challenges, although they might be using it under the hood because they run tests through your function and check the expected results. I don't know what they use to accomplish that.
Albert Cardona II
@daddycardona
Aug 21 2017 03:53
Yeah I don't like some of these challenges either is like here is this study this and do it MOFO and I am like um I never done that before to that extent lol
Ken Haduch
@khaduch
Aug 21 2017 03:58
@daddycardona - I don't think that there is one perfect way to learn this stuff. The challenges are trying to build on things that you've been introduced to through the previous challenges. Sometimes they take a rather large leap between lessons, you have to synthesize a lot of the previously touched-on knowledge to complete a challenge. FOr thie "Wherefore art thou" you can solve it using straightforward for loops and using the things they point out in the "Helpful links" - .hasOwnProperty() and Object.keys() along with some small amount of creativity how to do the "bookkeeping" to decide the result of keeping an object or rejecting it. Using .filter() makes the code a lot more concise, but you do not need to use any of the higher-order functions to solve this one.
Albert Cardona II
@daddycardona
Aug 21 2017 04:00
I lost all my creativity @khaduch LOL I been doing this one and almost saw the answer on stackoverflow. I was looking to see how I can match certain values and what if statement I needed and was burnt out I deleted my code lol
Now I was trying to see if .reduce could help me out with the .every method but that also confused me @khaduch
Ken Haduch
@khaduch
Aug 21 2017 04:02
@daddycardona - you should always save your code if you have been working on it for a while - even if you want to start over, save it as a backup.
Albert Cardona II
@daddycardona
Aug 21 2017 04:02
I thought about that but then restarted my computer and was like damn I forgot to ctrl z the hell out of it lol
@khaduch do you use vscode
BTW I am also from MA
Ken Haduch
@khaduch
Aug 21 2017 04:06

@daddycardona - the thing to realize about this is that the collection is an array of objects. You are given a source object that has properties and values. You can use Object.keys() to get an array of the keys in the source object - see the word array you can think of "for loop" to iterate.

Now for each object in the collection array, you just use the list of source keys to check if each object in the array (one at a time) has all of the properties that are in source, and if it has the property, then it must have matching values. Once your look at an object from collection, if it has all matches and no misses, you push the object into a new array that will be your output.

where from in MA?
the image on your website makes it look like you live in a fortress... :)
Albert Cardona II
@daddycardona
Aug 21 2017 04:07
I am from Worcester but live in Douglas
That is my Castle in Spain LOL at least it haves my last name on the castle so in my imagination it is mine LOL
Ken Haduch
@khaduch
Aug 21 2017 04:08
@daddycardona - my daughter and her husband live in Douglas! I'm in Littleton...
Albert Cardona II
@daddycardona
Aug 21 2017 04:09
Nice I live in hayward landing in E. Douglas but their should be no E. Douglas lol
I never really been to LIttleton but saw it on a map many times lol
Albert Cardona II
@daddycardona
Aug 21 2017 04:14
I have been to Lowell and Lawrence before many times that is why I know Littleton @khaduch
Ken Haduch
@khaduch
Aug 21 2017 04:20
@daddycardona - well, good to meet you... I put some hints up there in my comment a few comments ago - I don't know if that will help you. The best way would be to take one of the testcases and walk through it, maybe on paper, just to get familiar with what you are trying to do in this challenge - maybe even just think about comparing one of the objects from collection with the source object, and see if you get to the point where you know how to do that in a walkthrough. Then try to code it.
I have to check out for the night - it's getting late for me... but you know you're in the same timezone... good luck with that, I hope you get through the frustration. That's a good exercise for tying together a few key concepts.
Albert Cardona II
@daddycardona
Aug 21 2017 04:22
I had it compare the source and was like if(object.keys(collection).hasOwnProperty(source)
Good night neighbor ;)
oh btw I copied and pasted what you said as a comment on vscode so I can code it like that lol
thanks @khaduch
CamperBot
@camperbot
Aug 21 2017 04:22
daddycardona sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3225 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 21 2017 04:23

@daddycardona - here's a little more - start with this:

var sourceKeys = Object.keys(source);

Then you have a list of keys, which you can use to look things up in the collection objects. You cannot directly reference source in your .hasOwnProperty method.

I don't know what vscode is - a code editor?
Anyway - I have to run along... good night, neighbor. Maybe I'll catch you back here tomorrow sometime or in the future...
Here's one more hint - if you go the route of just using for loops, you will have two nested loops. The outer one will be iterating over the collection, so you'll be referring to objects using collection[i] The inner loop will be iterating over sourceKeys (from the code that I just posted up there) and you'll reference things using sourceKeys[j] So you would have some test code, part of the inner loop test if( collection[i].hasOwnProperty(sourceKeys[j]) && code to check the values) - that's part of a hint, if it helps...
kryssxx
@kryssxx
Aug 21 2017 04:29
@khaduch Thanks for that!
CamperBot
@camperbot
Aug 21 2017 04:29
kryssxx sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3226 | @khaduch |http://www.freecodecamp.com/khaduch
Albert Cardona II
@daddycardona
Aug 21 2017 04:30
@khaduch Yes code editor
Okay thanks again @khaduch
CamperBot
@camperbot
Aug 21 2017 04:31
daddycardona sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:warning: daddycardona already gave khaduch points
Jackson Pearce
@jacksonpearce
Aug 21 2017 04:40
Hey guys im making my portfolio for FCC and im trying to make my header but i cant get the links to be inline
Screen Shot 2017-08-21 at 2.40.22 pm.png
as seen here, the headings ‘stack’ and i cant figure out how to make them inline, ive tried googling it and all.
any ideas on what to change/add?
Albert Cardona II
@daddycardona
Aug 21 2017 04:43
link to codepen
are you using navbar ?
@jacksonpearce
Does that work?
Gulsvi
@gulsvi
Aug 21 2017 04:48
@jacksonpearce You have bootstrap 4 added to your codepen, but your HTML is for Bootstrap 3. Delete your link to Bootstrap 4 in your codepen CSS settings. Go to the Quick-add menu and choose Bootstrap 3 instead
Jackson Pearce
@jacksonpearce
Aug 21 2017 04:50
Boom! Thank you @SkyC0der
CamperBot
@camperbot
Aug 21 2017 04:50
jacksonpearce sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2511 | @skyc0der |http://www.freecodecamp.com/skyc0der
Darren
@DarrenfJ
Aug 21 2017 05:10
evening fCC
Albert Cardona II
@daddycardona
Aug 21 2017 05:13
evening @DarrenfJ
how was your day :)
Darren
@DarrenfJ
Aug 21 2017 05:13
@daddycardona good man, and yours?
Albert Cardona II
@daddycardona
Aug 21 2017 05:13
excellent ;)
Darren
@DarrenfJ
Aug 21 2017 05:13
working on the twitch challenge...
so you know, ajaxing it away ;)
Albert Cardona II
@daddycardona
Aug 21 2017 05:14
the hardest part about the twitch challenge was learning the api LOL
after that was learning the ajax again LMAO
Darren
@DarrenfJ
Aug 21 2017 05:16
yah specially now that you gotta play with the fCC glitch version of the url to access it
Albert Cardona II
@daddycardona
Aug 21 2017 05:21
LOL I don't know let me see what I did for that lol
Yeah I called an ajax one time send it to a function and said if it was null get the name through a weird method and now I am thinking I could of just got a different ajax call and made it eaiser lol
@DarrenfJ
Darren
@DarrenfJ
Aug 21 2017 05:32
ha! yah, i'm still looking over the Json to see what to put where
thanks for the tip though :D
thanks @daddycardona
CamperBot
@camperbot
Aug 21 2017 05:32
darrenfj sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 319 | @daddycardona |http://www.freecodecamp.com/daddycardona
bfrancois0508
@bfrancois0508
Aug 21 2017 05:32
I need help
Darren
@DarrenfJ
Aug 21 2017 05:32
what's up @bfrancois0508
what are you working on?
bfrancois0508
@bfrancois0508
Aug 21 2017 05:32
onthis Use Responsive Design with Bootstrap Fluid Containers
this question Make sure you have nested all HTML elements in .container-fluid.
Darren
@DarrenfJ
Aug 21 2017 05:33
@bfrancois0508 ok
so container-fluid is a class in Bootstrap
bfrancois0508
@bfrancois0508
Aug 21 2017 05:33
yes i know that sir
Darren
@DarrenfJ
Aug 21 2017 05:34
and all the html needs to be in a div with that class
so the html part needs to have a div at the top and a closing div at the bottom
bfrancois0508
@bfrancois0508
Aug 21 2017 05:34
me i know what nesting is its just i dont know where to out it
Albert Cardona II
@daddycardona
Aug 21 2017 05:34
yeah so all other divs must go inside the outer divs
bfrancois0508
@bfrancois0508
Aug 21 2017 05:34
put it
here is my code
Darren
@DarrenfJ
Aug 21 2017 05:35
@bfrancois0508 do you know where the CSS ends and the html starts in the exercise?
bfrancois0508
@bfrancois0508
Aug 21 2017 05:35

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="#">cat photos</a>.</p>

<a href="#"><img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back. "></a>

<div class="container-fluid">

<p>Things cats love:</p>
<ul>
<li>cat nip</li>
<li>laser pointers</li>
<li>lasagna</li>
</ul>
<p>Top 3 things cats hate:</p>
<ol>
<li>flea treatment</li>
<li>thunder</li>
<li>other cats</li>
</ol>
<form action="/submit-cat-photo">
<label><input type="radio" name="indoor-outdoor"> Indoor</label>
<label><input type="radio" name="indoor-outdoor"> Outdoor</label>
<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Crazy</label>
<input type="text" placeholder="cat photo URL" required>
<button type="submit">Submit</button>
</form></div>

yes i know where it ends
Darren
@DarrenfJ
Aug 21 2017 05:35
yah but where does it start?
(hint, right at the end of the CSS section)
bfrancois0508
@bfrancois0508
Aug 21 2017 05:35
red text
Albert Cardona II
@daddycardona
Aug 21 2017 05:36
so put that div class=container-fluid before h2 that would be all the elements @bfrancois0508
bfrancois0508
@bfrancois0508
Aug 21 2017 05:36
umm..... i dont kno w
Darren
@DarrenfJ
Aug 21 2017 05:36
@bfrancois0508 yup .. the red text html line is the first line of the html
bfrancois0508
@bfrancois0508
Aug 21 2017 05:36
yes
Darren
@DarrenfJ
Aug 21 2017 05:36
what tags is all the CSS nested in? (the closing one is the end of the CSS0
bfrancois0508
@bfrancois0508
Aug 21 2017 05:37
the <style> tag
Darren
@DarrenfJ
Aug 21 2017 05:37
@bfrancois0508 yup.. :D you got it
so the <div class="container-fluid"> goes right after the closing style tag
bfrancois0508
@bfrancois0508
Aug 21 2017 05:38
that you @DarrenfJ and @daddycardona
Darren
@DarrenfJ
Aug 21 2017 05:38
@bfrancois0508 this SO article gives good info too on the media queries that make up a container-fluid vs a container class in Bootstrap
bfrancois0508
@bfrancois0508
Aug 21 2017 05:38
i appreciate it @DarrenfJ
Albert Cardona II
@daddycardona
Aug 21 2017 05:39
you welcome bro
Darren
@DarrenfJ
Aug 21 2017 05:39
thanks @daddycardona for helping out too :D
CamperBot
@camperbot
Aug 21 2017 05:39
darrenfj sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:warning: darrenfj already gave daddycardona points
Albert Cardona II
@daddycardona
Aug 21 2017 05:41
You know what I hate @DarrenfJ I just get ahead of challenge and then bam stuck again lmao
Darren
@DarrenfJ
Aug 21 2017 05:41
I hear yah...
Albert Cardona II
@daddycardona
Aug 21 2017 05:42
in the same challenge lol
Darren
@DarrenfJ
Aug 21 2017 05:42
i find i seem so far behind when i try the projects.. compared to what i think i know from doing the exercises
Albert Cardona II
@daddycardona
Aug 21 2017 05:43
lmao me too it's like I wish certain concepts were explained better to me like these for loops are great but explain filter and reduce in a video liek an example that we are doing so we can understand how it works. I saw like 30 vides
videos and still for my project am like wtf lol
Darren
@DarrenfJ
Aug 21 2017 05:44
ha!
yah :D
Albert Cardona II
@daddycardona
Aug 21 2017 05:46
Like idk if you went ahead with the algorythems and then did the pens or are just following down the line, but it is like I never thought like this before I wrote it out a couple of times and was very close to hitting my tv on accident lmao
Darren
@DarrenfJ
Aug 21 2017 05:46
on accident ;)
Albert Cardona II
@daddycardona
Aug 21 2017 05:46
because I threw my pen
my computer is connected to the tv lol
Darren
@DarrenfJ
Aug 21 2017 05:47
i figured :D
Albert Cardona II
@daddycardona
Aug 21 2017 05:47
yeah I have a 55 inch 4k tv lol
from walmart can't afford another one lol
Darren
@DarrenfJ
Aug 21 2017 05:47
if it's attached to the wall it's safe ha!
from being thrown across the room anyway
Albert Cardona II
@daddycardona
Aug 21 2017 05:47
no its not lol
its on a tv stand lmao
Darren
@DarrenfJ
Aug 21 2017 05:48
dangerous
Joseph
@revisualize
Aug 21 2017 05:48
Hey.
Albert Cardona II
@daddycardona
Aug 21 2017 05:48
i just start watching tv when I get to frustrated I have PTSD lmao
Darren
@DarrenfJ
Aug 21 2017 05:48
i mostly want to throw stuff when i play call of duty
Albert Cardona II
@daddycardona
Aug 21 2017 05:48
hey @revisualize
LMAO I hate playing with my kids they are like 23 and 4 and im like 4 and 23 lol
Darren
@DarrenfJ
Aug 21 2017 05:49
but coding problems or being stuck just sends me more down the hole into wonderland
Albert Cardona II
@daddycardona
Aug 21 2017 05:49
I got it from fcc lmao
yeah I am almost like should I just start or find something new to start a new career in even though looking at code is fascinating to me lol
Darren
@DarrenfJ
Aug 21 2017 05:50
anytime i try to play anything online there's some 10 year old who has a nice nest and just sniper shoots you in the head ever time you spawn. ;)
Albert Cardona II
@daddycardona
Aug 21 2017 05:50
LMAO that might be my son LOL
Darren
@DarrenfJ
Aug 21 2017 05:50
all those kid reflexes are way too fast for me...
Albert Cardona II
@daddycardona
Aug 21 2017 05:50
its not the reflexes its just not as easy as mario for me lol
Darren
@DarrenfJ
Aug 21 2017 05:51
easy as mario
:D
i prefer RPG's though
Albert Cardona II
@daddycardona
Aug 21 2017 05:52
I am a huge Zelda fan but I don't like final fantasy style rpgs
except for nights of the old republic because it was star wars and the story line was awesome
Darren
@DarrenfJ
Aug 21 2017 05:54
love KOTOR
love it
Jolee Bindo man
Albert Cardona II
@daddycardona
Aug 21 2017 05:54
Part 1 was better than part 2 but I loved them both :)
Darren
@DarrenfJ
Aug 21 2017 05:55
sooo good :D
Albert Cardona II
@daddycardona
Aug 21 2017 05:55
I don't remember it that much I almost want to play again it's been so long and I have time I am retired :)
Darren
@DarrenfJ
Aug 21 2017 05:55
noice
i liked jade too which i think was by the same gaming company
and I think they or an offshoot or something was part of mass effect and Dragon's age
Albert Cardona II
@daddycardona
Aug 21 2017 05:56
never heard of it
Darren
@DarrenfJ
Aug 21 2017 05:56
but still, nothing like KOTOR
Albert Cardona II
@daddycardona
Aug 21 2017 05:56
mass affect adromada had so many bugs lol
I want to play it again because I got with the blue girl and the ugly skeleton head girl but never the human one lol
Darren
@DarrenfJ
Aug 21 2017 05:58
i only played 1 and 2 kept meanin to play 3 and never got around to it
and so now i will need to play 1 nad 2 again before 3 and i just don;t have 3000 hours of free time ;0
that was right after the KOTORs and had a similar look and feel
but kung fu!
Albert Cardona II
@daddycardona
Aug 21 2017 05:59
LOL your so right but part 3 you don't need to play 1 and 2 again I almost did that too but part 3 was amazing enough to give a similar back story ;)
oh really damn I missed this then
Darren
@DarrenfJ
Aug 21 2017 06:00
Jade was my number 3 after KOTOR 1 and 2
i just fell in love with the game
was always hoping for a sequel but then they did the mass effects and Dragon's Age
Albert Cardona II
@daddycardona
Aug 21 2017 06:02
My favorite game is zelda ocarina of time even though this last one was just as good
BOTW
Albert Cardona II
@daddycardona
Aug 21 2017 06:08
gn everyone
Darren
@DarrenfJ
Aug 21 2017 06:31
@daddycardona have a good one brutha :D
adam
@f690250529
Aug 21 2017 08:16
hello guys ~.~!
kalikota ssv teja
@tejakali
Aug 21 2017 08:48
function whatIsInAName(collection, source) {
var arr = [];
var arr1=Object.getOwnPropertyNames(source);
return source.arr1[0];
}
iam getting an error cannot read propert 0 of undefined
whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
anyone Help me
korzo
@korzo
Aug 21 2017 09:26
@tejakali return source[arr1[0]];
rawatdeepesh
@rawatdeepesh
Aug 21 2017 11:54
hello anyone here who could help me with Facebook's Marketing API, thanks
ro0tkit
@ro0tkit
Aug 21 2017 13:03
Help! challenge 139. Convert Celsius to Fahrenheit
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 13:03
@ro0tkit show us what you have
ro0tkit
@ro0tkit
Aug 21 2017 13:05

@tiagocorreiaalmeida
function convertToF(celsius) {
var fahrenheit;
// Only change code below this line

fahrenheit=celsious*(9/5)+32;

// Only change code above this line
return fahrenheit;
}

// Change the inputs below to test your code
convertToF(30);

Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 13:05
you case use 3 batsticks ``` then if you press enter and then past of your in the middle of them and ctr +enter it will look better try it, and will give it a look right now
@ro0tkit
"celsious"
Ken Haduch
@khaduch
Aug 21 2017 13:09
@ro0tkit - Code posting documentation using markdown syntax: https://forum.freecodecamp.com/t/markdown-code-formatting/18391
@ro0tkit - and as @tiagocorreiaalmeida pointed out - the spelling of the variable name celsius has to match the function argument name when you use it in the equation. Otherwise it looks like it would be good to go.
ro0tkit
@ro0tkit
Aug 21 2017 13:28
@tiagocorreiaalmeida @khaduch Didnt get what the backtick does ? help paste code?
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 13:28
yeah likes this
console.log("hello world");
image.png
Ken Haduch
@khaduch
Aug 21 2017 13:29
@ro0tkit - yes, it makes the code more readable here in the chat room, and that's a good thing... it also makes the text that you type in not be interpreted by the browser, so any special characters in your code show up just as you typed them.
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 13:29
helps make it more readable for the others to help in this case was just a few lines of code but when it gets bigger its problematic
ro0tkit
@ro0tkit
Aug 21 2017 13:33
function convertToF(celsius) {
  var fahrenheit=celsius*(9/5)+32;
  // Only change code below this line


  // Only change code above this line
  return fahrenheit;
}

// Change the inputs below to test your code
convertToF(0);
@tiagocorreiaalmeida @khaduch Thanks guys. Thats my code that actually passed. Challenge has a bug i think.
CamperBot
@camperbot
Aug 21 2017 13:35
ro0tkit sends brownie points to @tiagocorreiaalmeida and @khaduch :sparkles: :thumbsup: :sparkles:
:cookie: 320 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
:star2: 3227 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 21 2017 14:01
@ro0tkit - what do you think the bug is? That's really a pretty straightforward exercise, there are sometimes issues with browser caching of different versions of the code that you put in that sometimes require a reload and repasting of the code... But that's something that the testing cannot figure out.
Darren
@DarrenfJ
Aug 21 2017 15:05
morning fCC
Darren
@DarrenfJ
Aug 21 2017 15:30
what's everyone's most favourite node course non fCC style?
Alexander Køpke
@alexanderkopke
Aug 21 2017 15:44
hi, does it have to be pure node course?
Darren
@DarrenfJ
Aug 21 2017 15:44
hmmm not necessarily
Alexander Køpke
@alexanderkopke
Aug 21 2017 15:45
ok then I liked Colt Steel's course on udemy
Darren
@DarrenfJ
Aug 21 2017 15:45
but something that will give yah a bit of node hands on and get familiar wiht it
@alexanderkopke the web developer bootcamp one?
Alexander Køpke
@alexanderkopke
Aug 21 2017 15:46
his course went over node, express and mongo and setting it up on heroku
yes the bootcamp one
Darren
@DarrenfJ
Aug 21 2017 15:47
cool
thanks @alexanderkopke
CamperBot
@camperbot
Aug 21 2017 15:47
darrenfj sends brownie points to @alexanderkopke :sparkles: :thumbsup: :sparkles:
:star2: 1644 | @alexanderkopke |http://www.freecodecamp.com/alexanderkopke
Alexander Køpke
@alexanderkopke
Aug 21 2017 15:47
np
Daniel Ahn
@danii956
Aug 21 2017 17:10

Can anyone explain to me how this transition works?

.selector {
  width: 20px;
  height: 20px;
  float: right;
  clear: right;
  transition: width 2s;
}
.selector:hover {
  width: 50px;
}

I'm confused as to why having both float: right and clear: right will allow only one specific element with class selector to change width but my understanding is that float:right and clear:right should immediately cancel each other...

Here is an example. Just hover the dots on the right to see its effects: https://codepen.io/danii956/pen/NvYwLj
Kingsley
@Kingwindie
Aug 21 2017 17:22
can someone help me explain these lines of code,the one with the e.target.value,what is the e and the target doing?
```
document.getElementById('milesInput').addEventListener('input' , function(e){
var userInput = e.target.value;
bfrancois0508
@bfrancois0508
Aug 21 2017 17:39
i need help
somone help me
ajhernandez95
@ajhernandez95
Aug 21 2017 17:53
I am having a hard time with the box-shadow challenge and understanding the values of each number/px.
Stephen James
@sjames1958gm
Aug 21 2017 18:21
@Kingwindie e is the event object for the input event. e.target is the DOM element that the input event was triggered on
@bfrancois0508 What's your issue
Yuserah Din
@YuserahN
Aug 21 2017 19:34

I'm trying to find the least common multiple from the range of numbers between the given array of numbers. Ex: [1, 5]
I've stored the range of numbers in an array called nums. Now I'm trying to use the every() method to find the least common mulitple.

```

function smallestCommons(arr) { 

  var nums = [], multiple = 1, LCM, foundIt = false; 

  for(var i = 1; i <= arr[1]; i++) {
    nums.push(i); 
  }

  function getLCM(element, index, array) { 
    multiple++; 
    LCM = nums.length * multiple; 
    return LCM % element === 0; 
  }   

  while(!foundIt) { 
    //foundIt = true; 
    if(nums.every(getLCM) == false) {
      foundIt = false; 
    }
  }
  return LCM;
}


smallestCommons([1,5]);
Stephen James
@sjames1958gm
Aug 21 2017 19:37
@YuserahN you are calling multiple ++ for every call to getLCM, shouldn't every work on a single value of multiple at a time?
Yuserah Din
@YuserahN
Aug 21 2017 19:38
@sjames1958gm Yeah you
you're right
Stephen James
@sjames1958gm
Aug 21 2017 19:38
Not sure the length of nums has anything to do with the LCM?
Yuserah Din
@YuserahN
Aug 21 2017 19:38
Thanks it worked. @sjames1958gm
CamperBot
@camperbot
Aug 21 2017 19:38
yuserahn sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8358 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 21 2017 19:38
@YuserahN :+1:
telepylus
@telepylus
Aug 21 2017 19:48
Beta hasn't been working for weeks. Any idea when it will be back?
AaronOoooo
@AaronOoooo
Aug 21 2017 20:22
Hi.. I could use some javascript assistance: If i have a string ( str="text text text"), is there a way to indicate whether str contains white spaces? I tried str.indexOf(" ") but that didn't seems to work.
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:22
you could loop the string length, but what's the idea ?
AaronOoooo
@AaronOoooo
Aug 21 2017 20:24
@tiagocorreiaalmeida I am working on javascript Confirm the Ending section.
const str = 'words words words';

console.log(str.includes(' '));  // logs 'true'
AaronOoooo
@AaronOoooo
Aug 21 2017 20:25
@thekholm80 Thank you. I will check that out.
CamperBot
@camperbot
Aug 21 2017 20:25
aaronooooo sends brownie points to @thekholm80 :sparkles: :thumbsup: :sparkles:
:star2: 1448 | @thekholm80 |http://www.freecodecamp.com/thekholm80
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:25
@AaronOoooo if im not wrong here the idea is check if the the letter given is included in the setence right?
AaronOoooo
@AaronOoooo
Aug 21 2017 20:25
@tiagocorreiaalmeida Letters and Words.
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:27
I used substrremove the target length and then compared if str was equal to target
if its confusing I can help further
AaronOoooo
@AaronOoooo
Aug 21 2017 20:29
@tiagocorreiaalmeida Oh ok, I understand what you mean.
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:29
you know substr right?
per example
AaronOoooo
@AaronOoooo
Aug 21 2017 20:31
@tiagocorreiaalmeida I don't know it off the top of my head. I will have to explore it further, though.
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:32
str = "hello".substr(-2);
console.log(str);
try this
AaronOoooo
@AaronOoooo
Aug 21 2017 20:35
@tiagocorreiaalmeida Thank you!!!
CamperBot
@camperbot
Aug 21 2017 20:35
aaronooooo sends brownie points to @tiagocorreiaalmeida :sparkles: :thumbsup: :sparkles:
:cookie: 321 | @tiagocorreiaalmeida |http://www.freecodecamp.com/tiagocorreiaalmeida
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:36
np your photo in small size remembers me of mike tyson ehehhe
AaronOoooo
@AaronOoooo
Aug 21 2017 20:37
@tiagocorreiaalmeida If only i could box like he use to do.
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:39
and rip off some ears
:D
AaronOoooo
@AaronOoooo
Aug 21 2017 20:43
@tiagocorreiaalmeida And tattoo my face...
Kacper
@KacperPL0
Aug 21 2017 20:56
hello guys!
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:58
hey
Kacper
@KacperPL0
Aug 21 2017 20:59
i'm fighting with tribute page project and i want to make a nice quote next to main image. For now i made my text to be next to img but its on top of it and i want to be at the bottom. I tried everything...
my code looks like this:

'''
.main-image {
border-color: purple;
border-width: 5px;
border-radius: 20%;
border-style: double;
display: inline;
float: left;
}

blockquote {
display: block;
color: purple;
margin-left: 50em;
margin-right: 16em;
}
'''

CamperBot
@camperbot
Aug 21 2017 20:59
:bulb: to format code use backticks! ``` more info
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 20:59
send us your code pen
if possible
Kacper
@KacperPL0
Aug 21 2017 21:00
.main-image {
border-color: purple;
border-width: 5px;
border-radius: 20%;
border-style: double;
display: inline;
float: left;
}
blockquote {
display: block;
color: purple;
margin-left: 50em;
margin-right: 16em;
}
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 21:00
@KacperPL0 are you using codepen?would prefer to see it there and text
Kacper
@KacperPL0
Aug 21 2017 21:01
oh, ok
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 21:02
you want the text below the image?
Kacper
@KacperPL0
Aug 21 2017 21:03
next to image, at the bottom
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 21:04
by bottom you mean below the image or in that place at the bottom?
Kacper
@KacperPL0
Aug 21 2017 21:04
in that place at the bottom
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 21:06
that's gonna look a bit strnage and sorry can't thibk of something that would help in this case, are you new to css?
Kacper
@KacperPL0
Aug 21 2017 21:07
yep, i'm new...
well, i think i'm just give quote somwhere else
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 21:10
im not remembering any simple way of doing that cause you are creating a blank space
using position relative on div and absolute on block and them bottom:0 and right 0; wouldd the trick I think but so confusing to achive such simple thing
did oyu heard about bootstrap?
Kacper
@KacperPL0
Aug 21 2017 21:12
yes
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 21:12
@KacperPL0 did you heard aswell about codeacademy platform?
it has a few html/css cursos
courses
think it would help you alot in starting
Kacper
@KacperPL0
Aug 21 2017 21:13
i made first html and css courses at codeacademy
Tiago Correia
@tiagocorreiaalmeida
Aug 21 2017 21:15
ohhh ok then that was a smart idea, I think maybe start for a easier thing, and if someone comes with a greater idea of how to help you then you move further , sorry and gl @KacperPL0
Kacper
@KacperPL0
Aug 21 2017 21:16
thank you very much for your time. For now i have another idea for this page and i will see how its gonna look like
Cameron Sumpter
@csumpter
Aug 21 2017 21:54
I am wondering if anyone knows if we are allowed to use npm packages to parse the date on the Timestamp Microservice base jump?
Stephen James
@sjames1958gm
Aug 21 2017 22:08
@csumpter Sure you can.
Cameron Sumpter
@csumpter
Aug 21 2017 22:11
@sjames1958gm rock on, thank you!
CamperBot
@camperbot
Aug 21 2017 22:11
csumpter sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8359 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Aug 21 2017 22:15
@csumpter :+1:
Ygor Dantas
@ygordantas
Aug 21 2017 23:51

hi guys :) Does anybody know why when I console.log this code I keep getting 0?
function commonCharacterCount(s1, s2) {
var answer =0;
for(var i=0; i<s2.length;i++){
if (s1.indexOf(i) !== -1){
answer++;
}
}
return answer;
}

console.log(commonCharacterCount("aabcc","adcaa"));

korzo
@korzo
Aug 21 2017 23:54
@ygordantas It should be if (s1.indexOf(s2[i]) !== -1){
@korzo Next time wrap your code between 3 `
Ygor Dantas
@ygordantas
Aug 21 2017 23:55
@korzo thanks man :)
CamperBot
@camperbot
Aug 21 2017 23:55
ygordantas sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 399 | @korzo |http://www.freecodecamp.com/korzo