These are chat archives for FreeCodeCamp/HelpFrontEnd

13th
Jun 2017
JD Tadlock
@jdtdesigns
Jun 13 2017 00:01
@vorousja Check this out and see if it makes sense https://codepen.io/jdtadlock/pen/vZKyvQ?editors=0010
@FlashHero What's your question?
Sara
@skd726
Jun 13 2017 00:03
hello! I'm working on my wikipedia viewer and when I try running it with console.log nothing comes up, can anyone help? https://codepen.io/skd726/pen/RgRWWm?editors=1011
JD Tadlock
@jdtdesigns
Jun 13 2017 00:08
@skd726 First thing I saw was async: false. You should never do this because the rest of your js won't load until the data is returned. This is the opposite of what ajax requests are for. We request data and run things while the data is being gathered and sent back to us. If the data took seconds to return, your app would be on hold for that whole time.
@skd726 You're missing the = in your button's id attribute
Curtis
@CurtisJCamp
Jun 13 2017 00:14
Hey can somebody help me with putting text over a background img?
vorousja
@vorousja
Jun 13 2017 00:14
@jdtdesigns i dont understand what the resolve etc bit is about
ive never seen/used that before
DarrylJLTolentino
@DarrylJLTolentino
Jun 13 2017 00:15
Hey guys! I'm working on the Local Weather program and I'm trying to figure out where I messed up when I'm trying to call the information from openweathermap.org. The only thing that actually shows up is the temperature, but the temperature is wrong. Was wondering if I could get some help! and thanks again! https://codepen.io/darryljltolentino/pen/oWMQpJ
JD Tadlock
@jdtdesigns
Jun 13 2017 00:15
vorousja
@vorousja
Jun 13 2017 00:15
mostly i dont understand why my code isnt working...im sure there are multiple routes to approach it
JD Tadlock
@jdtdesigns
Jun 13 2017 00:19
@DarrylJLTolentino You have two myLocation functions and don't have a getLocation function. Was this your original code?
DarrylJLTolentino
@DarrylJLTolentino
Jun 13 2017 00:22
I originally used getLocation but then I changed it to myLocation due to sematics of wanting the location where the user (in this case, me) was testing it. Nice catch! I didn't see that. @jdtdesigns
Long Nguyen
@longnt80
Jun 13 2017 00:26
@jdtdesigns are you familiar with touch events?
JD Tadlock
@jdtdesigns
Jun 13 2017 00:27
@longnt80 Haven't used them much, but I'm aware of them
Long Nguyen
@longnt80
Jun 13 2017 00:29
@jdtdesigns I tried to use them but it doesn't work properly on my phone, maybe my phone sucks
works fine on iPhone 6 though
Sara
@skd726
Jun 13 2017 00:32
@jdtdesigns Thank you!
CamperBot
@camperbot
Jun 13 2017 00:32
skd726 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1025 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
vorousja
@vorousja
Jun 13 2017 00:33
@jdtdesigns so promises are cool, even though this is my first hearing of them, whats not working properly with my code as it stands though?
JD Tadlock
@jdtdesigns
Jun 13 2017 00:38
@vorousja You're trying to use that variable link outside of the getCurrentPosition() callback. The ajax request will not have the data yet, so the link will not be ready.
@longnt80 Could be support conflicts with the software version on the phone, or the browser you have installed on the phone.
vorousja
@vorousja
Jun 13 2017 00:42
@jdtdesigns so thata the purpose of the promise/thennable function? is this convention when using apis
JD Tadlock
@jdtdesigns
Jun 13 2017 00:43
@vorousja Yes, you use the .then() or the callback to make sure the data has been received.
vorousja
@vorousja
Jun 13 2017 00:48
so the .then() only fires when something is "resolved"/returned from the function with the promise ? @jdtdesigns
@jdtdesigns how come you didnt utilize the document.ready() function?
Lucci Paula
@luccipaula
Jun 13 2017 00:51
I'm trying to work with this collapsible navigation bar, but the menu doesn't drop down when I make the window smaller... https://codepen.io/vivalucci/pen/LLZbMm
Zane Rogers
@zanerogers1990
Jun 13 2017 00:55
so i'm learning how to add default options to a switch statement however i can't seem to figure out how to lay it out. Am i on the right track? anyone care to nudge me in the right direction?
function switchOfStuff(val) {
  var answer = "";
  // Only change code below this line
  switch (val){
    case 1:
    a = "apple";
      break;
  }


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

// Change this value to test
switchOfStuff(1);
kirontoo
@kirontoo
Jun 13 2017 00:57
@zanerogers1990 is 'a' supposed to be answer?
Zane Rogers
@zanerogers1990
Jun 13 2017 00:58
@kirontoo yeah i just realized it should be answer = "a" ; however a is suppose to equal "apple." and i'm kinda stuck on trying to incorporate that.
M-C-Haker
@M-C-Haker
Jun 13 2017 00:59
can someone tell me why my image is not located within the header, even though it is within the header div?
Johnny
@jtan3
Jun 13 2017 01:03
@M-C-Haker you want your picture within the about section?
M-C-Haker
@M-C-Haker
Jun 13 2017 01:03
correct yup
kirontoo
@kirontoo
Jun 13 2017 01:04
@zanerogers1990 the syntax is correct. i'm not sure what you're trying to do though
Johnny
@jtan3
Jun 13 2017 01:04
@M-C-Haker you can add height to that section
Tom
@moT01
Jun 13 2017 01:05
@M-C-Haker i bet it's the float: right;
Zane Rogers
@zanerogers1990
Jun 13 2017 01:05
@kirontoo i am trying to write a switch statement to set answer to certain conditions that being "a" - "apple" ect. I understand the switch statements but whats confusing me is how to define a has apple within the statement. lol.
M-C-Haker
@M-C-Haker
Jun 13 2017 01:06
@moT01 you are correct thanks! now on to how to get it to the right of the text with a wrap... thinking text align and then some property for the text
CamperBot
@camperbot
Jun 13 2017 01:06
m-c-haker sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 713 | @mot01 |http://www.freecodecamp.com/mot01
Tom
@moT01
Jun 13 2017 01:06
@zanerogers1990 switch is basically a bunch of if else statements
BrunoM24
@BrunoM24
Jun 13 2017 01:07
@zanerogers1990
switch(var1){
case 'a':
    result = "apple";
   break;
case 'b':
    result = "bunny";
    break;
}
Tom
@moT01
Jun 13 2017 01:08
@M-C-Haker probly a lot of ways to get that done, ...could look into flexbox if you want. i bet that would work. not sure if its the most efficient. https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Zane Rogers
@zanerogers1990
Jun 13 2017 01:09
@moT01 @BrunoM24 @kirontoo ahh i figured it out with you guy's help! thanks again!
CamperBot
@camperbot
Jun 13 2017 01:09
zanerogers1990 sends brownie points to @mot01 and @brunom24 and @kirontoo :sparkles: :thumbsup: :sparkles:
:cookie: 279 | @kirontoo |http://www.freecodecamp.com/kirontoo
:cookie: 313 | @brunom24 |http://www.freecodecamp.com/brunom24
:cookie: 714 | @mot01 |http://www.freecodecamp.com/mot01
M-C-Haker
@M-C-Haker
Jun 13 2017 01:12
@moT01 yeah i just stumbled upon that myself... any thoughts on why it wont let me align it to the right and still be in the header? I just tried inline styling it and it wont work either
@moT01 got it, needed to set the overflow to auto in css
Tom
@moT01
Jun 13 2017 01:20
@M-C-Haker my recommendation for the portfolio, if you're doing it in order, is to not put too much effort into it, ...you will want to go back and pretty much redo the whole thing after you do more projects
Hayk Simonyan
@hayksim
Jun 13 2017 01:28
Hello guys. Could someone help me please. How can I link an image from my github account to codepen.io project? Thank you
M-C-Haker
@M-C-Haker
Jun 13 2017 01:31
@moT01 haha that's what i'm trying to avoid, but i see your point... "don't perfect get in the way of good enough" still a lot more to learn out there
Ananthakur
@Ananthakur
Jun 13 2017 02:13
guys how can one upload or use image in webbased coder?
Gulsvi
@gulsvi
Jun 13 2017 02:16
@Ananthakur use https://postimage.io - lots of people use that
@FlashHero sorry, I left... did you get it figure out?
Ananthakur
@Ananthakur
Jun 13 2017 02:18
@SkyC0der alright thanks
CamperBot
@camperbot
Jun 13 2017 02:18
ananthakur sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1684 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jun 13 2017 02:25
@vorousja Since navigator.geolocation takes some time to get your location, one way to solve the problem is to pass the lat/long as arguments to another function like:
navigator.geolocation.getCurrentPosition(function(position) {
  var lat = position.coords.latitude;
  var long = position.coords.longitude;
  getWeather(lat, long); // pass this data to another function when it's finally available
});

function getWeather(lat, long) {
  var url = "https://api.darksky.net/forecast/a1e26741088e9ece5c1b4b8ab23ff135/" + lat + ',' + long;
  $.getJSON(url + "?callback=?", function(data) {
    $(".weatherData").html(data.currently.apparentTemperature);
  });
}
Lucci Paula
@luccipaula
Jun 13 2017 02:41
@fdemaa THANK YOU!! I was getting so frustrated, hehe. :P
CamperBot
@camperbot
Jun 13 2017 02:41
caixeta-paula sends brownie points to @fdemaa :sparkles: :thumbsup: :sparkles:
:cookie: 239 | @fdemaa |http://www.freecodecamp.com/fdemaa
fdemaa
@fdemaa
Jun 13 2017 02:42
@caixeta-paula yes i had that problem alsohaha remember to add the libraries :)
Mr-Benjamin
@Mr-Benjamin
Jun 13 2017 02:58
Was having trouble making my bottom margin show some space, so I added two breaks firstly to give extra room at bottom of page and also to add a footer however the footer covered photo so adding breaks pushed the type down.
krishnaamen
@krishnaamen
Jun 13 2017 03:23
why my youtube frame is not working in html https://codepen.io/krishnaamen/pen/qjZzZJ/
M-C-Haker
@M-C-Haker
Jun 13 2017 04:00
@Mr-Benjamin you need to verify your email for us to see it in full view, i don't see anything below the pic
Rajat
@rajataudichya
Jun 13 2017 04:14
help required ! I am stuck in making the portfolio page can someone help me?
I am not able to link my nav bar about option with my div id #about
Hoang Thanh Tu
@hoangthanhtu
Jun 13 2017 04:15
@rajataudichya show your codepen link?
Mr-Benjamin
@Mr-Benjamin
Jun 13 2017 04:17
@M-C-Haker cool man thanks for th tip
Rajat
@rajataudichya
Jun 13 2017 04:18
@krishnaamen have you embeded it from youtube?
@krishnaamen the video link is not available on youtube
Max
@maxiwer
Jun 13 2017 04:28
@krishnaamen Hello, I think because you restricted watching video
@krishnaamen maybe you should try another video for example to check is it working
Ken Haduch
@khaduch
Jun 13 2017 04:35
@rajataudichya - where you have id="#about" in the about section, remove the # because that should not be part of the value of the ID attribute. Just make it id="about" and it should work.
Rajat
@rajataudichya
Jun 13 2017 04:37
@khaduch thanks buddy
CamperBot
@camperbot
Jun 13 2017 04:37
rajataudichya sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 2979 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jun 13 2017 04:41
@rajataudichya - you're welcome. Good luck with that project!
Rajat
@rajataudichya
Jun 13 2017 04:42
@khaduch :)
Lucci Paula
@luccipaula
Jun 13 2017 04:48
How can I get my collapsible menu to have a translucent background without it affecting the logo and the navigation links?https://codepen.io/vivalucci/pen/LLZbMm
The opacity is affecting everything
Rajat
@rajataudichya
Jun 13 2017 04:51
use rgb @caixeta-paula
its not working w8
M-C-Haker
@M-C-Haker
Jun 13 2017 04:53
I need help with 3 things: Only twitter is displaying for my social media page (not terribly important but frustrating)! I have not been able to find how to make the navbar links take them to different parts on the page (other than some javscript, which i don't think is necessary). This one is key to me advaning to the next step... any suggestions? also, i don't know why my form wont align properly in full screen... thoughts?
NghiaLe123
@NghiaLe123
Jun 13 2017 04:59
Hi everyone. I'm doing "Build a Tribute Page". I'm stuck. In the code <ul> the characters is too far from the dot. Please help me with this problem. Sorry for my bad English.
M-C-Haker
@M-C-Haker
Jun 13 2017 05:00
text-align: left: @NghiaLe123
NghiaLe123
@NghiaLe123
Jun 13 2017 05:03
I did it. But it's not working @M-C-Haker
M-C-Haker
@M-C-Haker
Jun 13 2017 05:06
@NghiaLe123 <ul text-align="left"> should be `<ul style="text-align: left;"
if you're inline styling
Long Nguyen
@longnt80
Jun 13 2017 05:10
@NghiaLe123 you didn't close your html tag, that's why your css is conflicting
<h2 class="text-center"><em>The man who saved a billion lives</em>
NghiaLe123
@NghiaLe123
Jun 13 2017 05:11
Oh my bad. Thanks a lot guys
Long Nguyen
@longnt80
Jun 13 2017 05:11
close that h2 tag and you can remove style="text-align: left;" on the ul
Sunny Wong
@swong194
Jun 13 2017 05:14
hi every1
i will be starting the intermediate projects soon
any advice?
Long Nguyen
@longnt80
Jun 13 2017 05:19
@swong194 learn to debug
Jayellrey
@Jayellrey
Jun 13 2017 05:41

Made a number of Adjustments to my Portfolio Page currently in Progress

https://codepen.io/JayEllRei/pen/yXOXxE/

Any Comments?

Botenga
@Botenga
Jun 13 2017 05:48
@Jayellrey what do you want me to say theres no much on your port page but it is looking good from what I see just.My advice would be go on code pen and search up portfolio and see other people port to get an idea of what you want yours to look like.
Jayellrey
@Jayellrey
Jun 13 2017 05:49
@Botenga thanks
CamperBot
@camperbot
Jun 13 2017 05:49
jayellrey sends brownie points to @botenga :sparkles: :thumbsup: :sparkles:
:cookie: 127 | @botenga |http://www.freecodecamp.com/botenga
Rajat
@rajataudichya
Jun 13 2017 05:51
I have a query , Whenever I use position absolute for an element , it helps me to put the child element on top of parent, but if I position it properly on laptop device, it changes it position when i see it from mobile device is there a solution to this?
Long Nguyen
@longnt80
Jun 13 2017 05:54

@rajataudichya

but if I position it properly on laptop device

what does this mean?

Max
@maxiwer
Jun 13 2017 06:03
Hello again, everybody. Could you help me with my portfolio webpage? I couldn't set background image to my "contact" section.
Johnny
@jtan3
Jun 13 2017 06:04
@maxiwer can you show your codepen?
Johnny
@jtan3
Jun 13 2017 06:15
@maxiwer you should close your rows after where you want stuff to end.
@maxiwer your portfolio section has 1 row
the rows should look like that
nitishptl
@nitishptl
Jun 13 2017 06:19
how do i run fcc test suite on my codepen projects?
Johnny
@jtan3
Jun 13 2017 06:20
@nitishptl you mean submit your project?
nitishptl
@nitishptl
Jun 13 2017 06:20
No
I think there's an fcc test suite
which runs tests on the projects
Johnny
@jtan3
Jun 13 2017 06:22
Im not using beta so i have no clue
Max
@maxiwer
Jun 13 2017 06:27
@jtan3 excuse me, could you reopen my project? When I started to modifying it it stopped.
Rajat
@rajataudichya
Jun 13 2017 06:28
@longnt80 i keep an element on the left:30 ; whenever i resize the screen it changes the from that postion
Johnny
@jtan3
Jun 13 2017 06:28
@maxiwer what do you mean it stopped?
Long Nguyen
@longnt80
Jun 13 2017 06:29
@rajataudichya do you have codepen link for it?
Curtis
@CurtisJCamp
Jun 13 2017 06:30
Hey can anybody help me with some card alignment on my portfolio project?
Botenga
@Botenga
Jun 13 2017 06:33
@CurtisJCamp where is your codepen post if you need help
Max
@maxiwer
Jun 13 2017 06:40
@jtan3 I can't open it.
Curtis
@CurtisJCamp
Jun 13 2017 06:44

@Botenga <p data-height="265" data-theme-id="0" data-slug-hash="jwrWXd" data-default-tab="result" data-user="CurtisjCamp" data-embed-version="2" data-pen-title="Portfolio Challenge for FCC" class="codepen">See the Pen <a href="https://codepen.io/CurtisjCamp/pen/jwrWXd/">Portfolio Challenge for FCC</a> by Curtis (<a href="https://codepen.io/CurtisjCamp">@CurtisjCamp</a>) on <a href="https://codepen.io">CodePen</a>.</p>

<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>

nitishptl
@nitishptl
Jun 13 2017 06:46
Do I need js to build my portfolio page?
Curtis
@CurtisJCamp
Jun 13 2017 06:46
I want both the cards to be side by side with one another but the second card keeps coming out all messed up
Rajat
@rajataudichya
Jun 13 2017 06:46
@nitishptl no
Marianissimus
@Marianissimus
Jun 13 2017 06:46
@nitishptl no, you don't. it's useful for some effects, but you do not need it
shivam gupta
@shivamg11000
Jun 13 2017 06:46
@nitishptl without js also you can ake awesome portfolio
make*
nitishptl
@nitishptl
Jun 13 2017 06:47
ok
Curtis
@CurtisJCamp
Jun 13 2017 06:49
@Botenga maybe this is better https://codepen.io/CurtisjCamp/pen/jwrWXd
Botenga
@Botenga
Jun 13 2017 06:55
@CurtisJCamp what is your issue
?
Rajat
@rajataudichya
Jun 13 2017 06:57
can somehelp me here
I am not able to give section background color not applying
Curtis
@CurtisJCamp
Jun 13 2017 06:57
I want the two cards under projects to be side by side and to be the same size. Also it looks like the second card has the edge of the card going through the link at the bottom when you view the page fullscreen @Botenga
Rajat
@rajataudichya
Jun 13 2017 06:58
I am not able to give the section about a backgorund color
got it thanks
Botenga
@Botenga
Jun 13 2017 07:00
@CurtisJCamp
why dont you use bootstrap responsive grid
also you are running bootstrap 4 go to your setting and change your external css. Paste this into your external css https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
Curtis
@CurtisJCamp
Jun 13 2017 07:03
I am running v4, okay i will
Can you give me an example where I would put the responsive grid?
Shashank Shekhar
@shashank2806
Jun 13 2017 07:13
I to start building portfolio page?
How*
Rajat
@rajataudichya
Jun 13 2017 07:20
@shashank2806 code pen bro
start with bootstrap navigation customize it and you are good to go
nitishptl
@nitishptl
Jun 13 2017 07:21
How do I give links to navigation bar to scroll down?
in portfolio webpage?
Rajat
@rajataudichya
Jun 13 2017 07:23
you just make a div of that particular area and give that a href
Curtis
@CurtisJCamp
Jun 13 2017 07:24
thank you @Botenga
CamperBot
@camperbot
Jun 13 2017 07:24
curtisjcamp sends brownie points to @botenga :sparkles: :thumbsup: :sparkles:
:cookie: 128 | @botenga |http://www.freecodecamp.com/botenga
Rajat
@rajataudichya
Jun 13 2017 07:24
for example < a href ="#home"> Home</a>
then create a <div id = "home>
similarly with about and contact us
nitishptl
@nitishptl
Jun 13 2017 07:25
ok got it thanks
Cato Myhre
@Zalmez
Jun 13 2017 08:06
can anyone help me finding the issue when I scroll to the bottom it disables the highlight on the navbar. also you can also see the transition for the hightlights are really late
Spyrantis Theodoros
@thodorisanta
Jun 13 2017 08:06
hey, i have exams in a bit. Can anyone explain to me the differences and benefits of each minimax and alpha beta please? :P
Cato Myhre
@Zalmez
Jun 13 2017 08:14
Figured it out ^^
musa B sesay
@musasesay
Jun 13 2017 08:34
i have develop some project but i dont know to arrange them to together to show your whole work some one help please
Princu
@Princu7
Jun 13 2017 08:59

Hey. A quirky question. If I have code like this:

var arr = [];
arr[0] = 1;
arr[1000] = 3;

As you can see, the length of the array is 1001 but I am using only two indices and the rest all are undefined. So, does the array will actually use all the size or some optimizations will be done by the compiler so memory won't be wasted?

Alexander Domikov
@AlexanderDom
Jun 13 2017 09:01
Hey @Princu7. it's more like a question for HelpJavaScript channel ;)
Princu
@Princu7
Jun 13 2017 09:02
Oh. Thanks. :smile: Will post there
nitishptl
@nitishptl
Jun 13 2017 09:07
@Princu7 array is block data structure, so the compiler will use all the size, Since all the array elements are next to each other, you can access each elements with its index.
Lidia Wisniewska
@lidiawisniewska
Jun 13 2017 09:14
Hi Everyone! I've gone back to my Twitch Tv project and it looks like something has gone wrong. Can anyone help?
Will Waymel
@willwaymel
Jun 13 2017 09:43
I'll take a look
in the meantime... how do I vertical - center this 25 in my big display? https://codepen.io/willwaymel/pen/XgKRRj?editors=1100
h1tag
@h1tag
Jun 13 2017 09:44
@lidiawisniewska add ?callback=? at the end of the twitch URLs
Will Waymel
@willwaymel
Jun 13 2017 09:46
@lidiawisniewska looks like your link to your api has https://wind-bow.gomix.me/twitch-api/streams/noobs2ninjas -- one of the streams hardcoded in (noobs2ninjas)
Will Waymel
@willwaymel
Jun 13 2017 09:54
@borisyordanov thanks
CamperBot
@camperbot
Jun 13 2017 09:54
willwaymel sends brownie points to @borisyordanov :sparkles: :thumbsup: :sparkles:
:cookie: 333 | @borisyordanov |http://www.freecodecamp.com/borisyordanov
Alexander Domikov
@AlexanderDom
Jun 13 2017 09:55
@willwaymel you can replace your height by line-height
if you are sure that your timer gonna have only one line
line-height: calc(10em - 4px); //4px - your borders 2px + 2px
/*height: 10em*/
or mega easy solution :) flexbox, display: inline-flex on timer and margin: auto on span child :D
Alexander Domikov
@AlexanderDom
Jun 13 2017 10:07
there are one more, with :after pseudo-element too
.text:after {
  content: "";
  display: inline-block;
  height: 100%;            /* Let it be as height as the parent */
  vertical-align: middle;
}
Rajat
@rajataudichya
Jun 13 2017 10:08
guys I need help in navigation
I am making a portfolio page
it is single page and when i click on the navigation options its directly show the div how can i make the navigation smooth with transiton
Alexander Domikov
@AlexanderDom
Jun 13 2017 10:10
you can animate when scrolling with jquery
Rajat
@rajataudichya
Jun 13 2017 10:12
@AlexanderDom Thanks,Let me try thi
CamperBot
@camperbot
Jun 13 2017 10:12
rajataudichya sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 432 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Rajat
@rajataudichya
Jun 13 2017 10:12
this*
Boris Yordanov
@borisyordanov
Jun 13 2017 10:26
@rajataudichya try and learn to user CSS animations first (https://www.w3schools.com/css/css3_animations.asp) before you start using libraries like jQuery
ReeceKidd
@ReeceKidd
Jun 13 2017 10:26

Hi guys I'm stuck on the 'Falsy bouncer' algorithm. I've recently discovered the falsy method however, I came up with a solution that doesn't use it. My only problem is it does not remove null values, anyone know why?

/////

function bouncer(arr) {

var falseValues = [false, null, 0, "", undefined, null ];

var result = arr.filter(function (val) {

return (falseValues.indexOf(val) === -1);

});

return result;

}

bouncer([1, null, NaN, 2, undefined]);

Ben said
@BenSaidRachid
Jun 13 2017 10:58
hi all,i'm doing tic tac toe challenge,and i don't know how to begin with,how to build the computer?to build the table?to save the choice of the player (x or o)?i need some hint
Calin Seredenco
@Noit0ra
Jun 13 2017 11:07

Hello guys can u pls help me with this
https://codepen.io/noit0ra/pen/GEqMee

I really can't see what is the mistake

Mauya
@Mauya
Jun 13 2017 11:08
I have been trying to do the local weather app for the past 2 months with no results and I have just realised that it now requires the https. What are the other option of going around this? I cannot but a secure licence to use for one project!!
h1tag
@h1tag
Jun 13 2017 11:10
@Mauya you can darksky or apixu, they both support https for free
Will Waymel
@willwaymel
Jun 13 2017 11:10
@AlexanderDom ok... amazing. thank you. sorry, I had to step away for a minute, now I'll be trying the flexbox first
CamperBot
@camperbot
Jun 13 2017 11:10
willwaymel sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 433 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Will Waymel
@willwaymel
Jun 13 2017 11:13
@AlexanderDom I don't understand how that flexbox solution works, but it's magic
Mauya
@Mauya
Jun 13 2017 11:15
@h1tag thanks I have seen this on the codepen and am using the JQuery for my app and have been struggling to understand how to incorporate it. should I just use the https provided and change code??
CamperBot
@camperbot
Jun 13 2017 11:15
mauya sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:cookie: 847 | @h1tag |http://www.freecodecamp.com/h1tag
h1tag
@h1tag
Jun 13 2017 11:16
@Mauya which provided https?
Mauya
@Mauya
Jun 13 2017 11:22
@h1tag Freecodecamp under the challenge for "show local weather" further down on the set instruction (link "dark Sky API". I am also now googling it as well
h1tag
@h1tag
Jun 13 2017 11:25
@Mauya Oh, good, didn't know they changed the instructions :) ... Yes, as I told you can use darksky
Mauya
@Mauya
Jun 13 2017 11:44
@h1tag working on it now thanks again.
CamperBot
@camperbot
Jun 13 2017 11:44
mauya sends brownie points to @h1tag :sparkles: :thumbsup: :sparkles:
:warning: mauya already gave h1tag points
Azure
@Aztinct
Jun 13 2017 12:02
hey guys, i am at 119, Build a Personal Portfolio Webpage, I am lost. The example given was something that ive never done before. How do you guys cope when FCC gets you to do something you've never done before?
Abhimanyu Ray
@maad-boy
Jun 13 2017 12:03
how will i know if a channel is online in twitchtv json api
please some body help me
Alexander Domikov
@AlexanderDom
Jun 13 2017 12:04
@willwaymel , it's because of margin: auto in all directions :)
and because you're inside a flex element
@willwaymel if it can help, and if you want to know why and how https://codepen.io/goerk/full/uFkny
Will Waymel
@willwaymel
Jun 13 2017 12:08
@AlexanderDom hmm i wonder if I can apply the same to the items in my 2 col-xs-6 columns... they get really far apart, when the screen is big, and I want them closer together. If I add display: inline-flex; to the container and then margin-left: auto to one and margin-right auto to the other... will that work? https://codepen.io/willwaymel/pen/XgKRRj?editors=0110
Alexander Domikov
@AlexanderDom
Jun 13 2017 12:10
wait i gonna see, i think its not the better way, with flex you can say your children elements how to behave ^^
Will Waymel
@willwaymel
Jun 13 2017 12:11
@AlexanderDom I guess not... I tried that and it didn't move them..
Alexander Domikov
@AlexanderDom
Jun 13 2017 12:12
instead you can add max-width on your .container-fluid
so you can control maximum width of your container
Will Waymel
@willwaymel
Jun 13 2017 12:17
@AlexanderDom you are a wizard. thanks again
CamperBot
@camperbot
Jun 13 2017 12:17
willwaymel sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 434 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Alexander Domikov
@AlexanderDom
Jun 13 2017 12:18
you're welcome @willwaymel ;) its nice, good coding
Azure
@Aztinct
Jun 13 2017 12:27
@Aztinct .
hey guys, i am at 119, Build a Personal Portfolio Webpage, I am lost. The example given was something that ive never done before. How do you guys cope when FCC gets you to do something you've never done before?
Vlasta Polach
@vlastapolach
Jun 13 2017 12:29
@Aztinct find something simillar (idealy on codepen - check the freecodecamp forum) and review the source code.. or dive into bootstrap tutorial.. there is everything you will need: https://www.w3schools.com/bootstrap/default.asp
Kaz Baig
@kbaig
Jun 13 2017 12:41
@Aztinct I'd also recommend starting out on a piece of paper and getting a basic structure down before you try to execute! Then you could ask for help or look for resources to do the specific pieces
Will Waymel
@willwaymel
Jun 13 2017 12:42
my buttons which are nice round circles in my browser, on mobile (chrome browser on iOS) show up as ovals... I've tried -webkit-appearance: none; -webkit-border-radius:none;
Vlasta Polach
@vlastapolach
Jun 13 2017 12:47
@willwaymel try to set button border-radius to 100px
Will Waymel
@willwaymel
Jun 13 2017 12:50
@vlastapolach now they are less ovalish... but more like rounded corner rectangular buttons
Vlasta Polach
@vlastapolach
Jun 13 2017 12:57
@willwaymel I added margin: 0 and padding 0 and it is working on my iphone
@willwaymel I gues that bootstrap added some padding on the mobile resolution to your button...
Will Waymel
@willwaymel
Jun 13 2017 12:58
@vlastapolach fantastic that worked
@vlastapolach thank you. hmmm how to debug in the future. I need a devtools for the mobile view
CamperBot
@camperbot
Jun 13 2017 12:58
willwaymel sends brownie points to @vlastapolach :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @vlastapolach |http://www.freecodecamp.com/vlastapolach
Alexander Domikov
@AlexanderDom
Jun 13 2017 12:59
@willwaymel you use border without precise color on purpose for timer ? ;)
Will Waymel
@willwaymel
Jun 13 2017 13:00
@AlexanderDom my idea was to let it come down from the colors in the body style... is that frowned on?
Vlasta Polach
@vlastapolach
Jun 13 2017 13:00
@willwaymel great :) in chrome devtools you can change to mobile view (Toggle device toolbar)
Mairi Ma
@mairima
Jun 13 2017 13:01
Hello guys does anyone know how to change a zigzag line to straight with javascript?
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:01
it's not a trick question, it just border by default inherit element's current color (by the way its a real value for color in css currentColor )
Will Waymel
@willwaymel
Jun 13 2017 13:01
@vlastapolach aha! I had seen that little button but didn't realize that's what it would do
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:01
it's a good practice :)
Will Waymel
@willwaymel
Jun 13 2017 13:02
@AlexanderDom huh... yeah I just wrote the code and it worked and so I left it. thanks for the tip
CamperBot
@camperbot
Jun 13 2017 13:02
willwaymel sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:warning: willwaymel already gave alexanderdom points
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:03
@vlastapolach in all recent browsers it's possible ;)
you can imitate loading speed and you have some exemple models like iphone and galaxys
In this portfolio, why is everything overriding the navigation bar?
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:05
surely because of z-index
by the way, you don't need to precise <head> on codepen
you can add files, scripts and fonts in pen options
and you have several times false value like 45 px with space between px and number
it not gonna work
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:11
; !important outside of css rule not gonna do anything ;)
Will Waymel
@willwaymel
Jun 13 2017 13:11
@AlexanderDom @vlastapolach oh that is so cool... (the different device debugging in chrome)
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:12
yes you have more bonus options for Android phones, and you can do many many other things with dev tools ;)
alican karalar
@alicankaralar
Jun 13 2017 13:14
hello guys
i need help regarding this
http://colossal-worth.livestyle.io/ - react markdown previewer

my problem is with the css though

=======

Sub-heading
-----------

### Another deeper heading

Paragraphs are separated
by a blank line.

Leave 2 spaces at the end of a line to do a  
line break

Text attributes *italic*, **bold**, 
`monospace`, ~~strikethrough~~ .

Shopping list:

  * apples
  * oranges
  * pears

Numbered list:

  1. apples
  2. oranges
  3. pears

The rain---not the reign---in
Spain.

 *[Herman Fassett](https://freecodecamp.com/hermanfassett)*

you can paste this to see,

why does the markdown start from the bottom and works its way up? how to do it the other way

nitishptl
@nitishptl
Jun 13 2017 13:15
@AlexanderDom Can you tell when should I use 'section', 'article' instead of div?
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:17
@nitishptl you can see complete explanation on this two links http://html5doctor.com/the-section-element/
Will Waymel
@willwaymel
Jun 13 2017 13:17
ok... so I fixed my buttons staying focused after click in the browser with button:focus { outline: none; but on mobile it still stays focused after click... tried -webkit-outline:none... to no avail
@willwaymel which mobile ?
nitishptl
@nitishptl
Jun 13 2017 13:18
thanks
Will Waymel
@willwaymel
Jun 13 2017 13:18
@AlexanderDom chrome on iOS although it's the same on the galaxy in the devtools debugger
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:22
@willwaymel it's seems like on mobile, since there are no :hover state, on focus, :hover is applied to and since you have !important in your background-color for hover
it overrides focus style
so you have a blue button
Will Waymel
@willwaymel
Jun 13 2017 13:22
@AlexanderDom hmmm i see. I didn't realize that.
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:24
and it's !important not !Important it's lowercase i ;)
This message was deleted
Eric Weiss
@eweiss17
Jun 13 2017 13:26
you should really avoid using important
not good practice
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:26
one good place to use it it's with js applied classes
like is-hidden etc.
to be sure that your rule gonna apply
Milos Ivankovic
@milos996
Jun 13 2017 13:31
i 'm working on my portfolio page, but my button toggle doesnt work, when i resize my browser page it doesnt show anything when i click on it (in <nav> ) https://codepen.io/milos996/pen/GEoVmy , does anyone have idea why?
tsss85
@tsss85
Jun 13 2017 13:33
Hi,
i have a problem for the Random Quote Machine :
In codepen, json don't work.
I've tried too
the chalenge 'get json with the jQuery get JSON Method' in codepen : Idem. nothing work
Eric Weiss
@eweiss17
Jun 13 2017 13:34
$.getJSON?
tsss85
@tsss85
Jun 13 2017 13:36
@eweiss17 in the JS section in CodePen
Eric Weiss
@eweiss17
Jun 13 2017 13:37
'''
CamperBot
@camperbot
Jun 13 2017 13:37
:bulb: to format code use backticks! ``` more info
Eric Weiss
@eweiss17
Jun 13 2017 13:37
use 3 backticks, it is hard to read like that
tsss85
@tsss85
Jun 13 2017 13:40
 $(document).ready(function() {
    $("#getMessage").on("click", function(){
   $.getJSON("https://www.freecodecamp.com/json/cats.json", function(json){
        $(".message").html(JSON.stringify(json));
      });

    });
  });
@eweiss17 i've tried to rebuild the challenge "Get JSON with the jQuery getJSON Method"
because i'm sure that the code works fine.
Eric Weiss
@eweiss17
Jun 13 2017 13:42
but that code would not give you random quotes?
tsss85
@tsss85
Jun 13 2017 13:44
@eweiss17 No json files will work. So I tried with the correction of a working exercise.
Kaz Baig
@kbaig
Jun 13 2017 13:44
Just about finished the design for the Simon game, buttons and all ^_^ What do you guys think? https://codepen.io/kbaig/full/weWBgp/
tsss85
@tsss85
Jun 13 2017 13:45
@eweiss17 Bootstrap and jQuery are added in the parameters
Will Waymel
@willwaymel
Jun 13 2017 13:47
@AlexanderDom Thank you again
CamperBot
@camperbot
Jun 13 2017 13:47
willwaymel sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 435 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Will Waymel
@willwaymel
Jun 13 2017 13:48
@eweiss17 regarding not using !important, i'm guessing I'll have to read into that... I've just defaulted to using it when my style doesn't get applied :)
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:48
you're welcome @willwaymel ;)
Eme
@Mezitek
Jun 13 2017 13:48
Hi guys, so I've been working on the personal portfolio project in codepen. Had some trouble so I copied the html and css into an editor and ran it in chrome. It displays completely differently outside of codepen (yes, I linked to bootstrap and added doctype, etc). Any idea why this might be happening?
Will Waymel
@willwaymel
Jun 13 2017 13:49
@eweiss17 thanks
CamperBot
@camperbot
Jun 13 2017 13:49
willwaymel sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 468 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:49
Eric Weiss
@eweiss17
Jun 13 2017 13:49
It's more of a hack, if your styles don't apply you should look wh
Kaz Baig
@kbaig
Jun 13 2017 13:49
@Mezitek What was the issue that you were having?
ChrisAB74
@ChrisAB74
Jun 13 2017 13:49
Guys I am having trouble getting my buttons to center on my page. Code:
.btn-primary{
background: black;
float:center;
margin: 0 auto;
}
Will Waymel
@willwaymel
Jun 13 2017 13:49
@AlexanderDom now to fix the buttons on my mobile view...
Eme
@Mezitek
Jun 13 2017 13:50
@kbaig two divs weren't displaying side by side. They do display side by side in regular chrome, but all the menu styling is gone, sizes have changed, etc.
Eric Weiss
@eweiss17
Jun 13 2017 13:50
@Mezitek did you link bootstrap and add doctype?
i'm just kidding
Eme
@Mezitek
Jun 13 2017 13:50
@eweiss17 yes, I did
@eweiss17 lol
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:50
@ChrisAB74 float: center doesnt exist
Eric Weiss
@eweiss17
Jun 13 2017 13:51
@tsss85 i'll link you the one i used
ChrisAB74
@ChrisAB74
Jun 13 2017 13:51
Okay, that would explain why I can get it to go left and right. How do I get it to center?
Eric Weiss
@eweiss17
Jun 13 2017 13:51
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:51
and background by itself has too many default values inside of it, if you need to change only color, so its background-color
Kaz Baig
@kbaig
Jun 13 2017 13:51
@ChrisAB74 display as a block if it isn't already and margin auto on the sides
@Mezitek do you still have the pen?
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:52
@ChrisAB74 margin-left:auto; margin-right: auto works on block elements with fixed width
if your element is not a block element or take all width of his parent (default behavior of a div element and other block elements)
so you dont gonna see "centering" effect
Eme
@Mezitek
Jun 13 2017 13:53
ChrisAB74
@ChrisAB74
Jun 13 2017 13:53
@AlexanderDom
tsss85
@tsss85
Jun 13 2017 13:53
@eweiss17 thank's I'll try
CamperBot
@camperbot
Jun 13 2017 13:53
tsss85 sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 469 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eme
@Mezitek
Jun 13 2017 13:54
@kbaig I'm really new at this
ChrisAB74
@ChrisAB74
Jun 13 2017 13:54
@AlexanderDom thanks
CamperBot
@camperbot
Jun 13 2017 13:54
chrisab74 sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 436 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Eric Weiss
@eweiss17
Jun 13 2017 13:54
@Mezitek it displays correct on codepen and wrongly in your own editor? what editor? just notepad++?
Eme
@Mezitek
Jun 13 2017 13:54
@eweiss17 yes, notepad++
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:54
perhaps wrong encoding in notepad options
Eme
@Mezitek
Jun 13 2017 13:54
@eweiss17 but, it seems that some things display correctly in one, and others correctly in the other
Eric Weiss
@eweiss17
Jun 13 2017 13:56
even though you say u checked it
it is probably how you are linking outside resources
Will Waymel
@willwaymel
Jun 13 2017 13:56
@eweiss17 @AlexanderDom so I changed the hover background to the .btn-default class, which now lets me not use the !important (specificity...) but when I click on mobile it still stays the hover color.
Eme
@Mezitek
Jun 13 2017 13:57
@AlexanderDom i will check that, thank you
CamperBot
@camperbot
Jun 13 2017 13:57
mezitek sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:cookie: 437 | @alexanderdom |http://www.freecodecamp.com/alexanderdom
Eric Weiss
@eweiss17
Jun 13 2017 13:57
@Mezitek i think i found it, in codepen you are using bootstrap 4.0, and in that meta tag, you have 3.2
Alexander Domikov
@AlexanderDom
Jun 13 2017 13:58
@willwaymel link your codepen again plz
Will Waymel
@willwaymel
Jun 13 2017 13:58
Kaz Baig
@kbaig
Jun 13 2017 13:58
@Mezitek codepen tip: you can stick the head stuff in the html settings and the regular area already counts as the body usually
@Mezitek You can also auto add libraries like Bootstrap from the settings!
Eme
@Mezitek
Jun 13 2017 13:59
@eweiss17 that was it! Thank you :)
CamperBot
@camperbot
Jun 13 2017 13:59
mezitek sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 470 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eme
@Mezitek
Jun 13 2017 13:59
@kbaig cool, thanks!
CamperBot
@camperbot
Jun 13 2017 13:59
mezitek sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 299 | @kbaig |http://www.freecodecamp.com/kbaig
Eme
@Mezitek
Jun 13 2017 14:00
I appreciate the help guys :)
Alexander Domikov
@AlexanderDom
Jun 13 2017 14:00
@willwaymel can you paste a screen print of your problem to be sure, you see hover style on clicking ?
you can remove hover styles for mobile screens with media-queries
Will Waymel
@willwaymel
Jun 13 2017 14:01
it doesn't say hover style in the debugger (i can't seem to get the debugger to inspect it in its clicked state), but the button nonetheless is the hover color. let me add a pic... @AlexanderDom
Kaz Baig
@kbaig
Jun 13 2017 14:02
@Mezitek np, you'll pick up a lot of stuff in no time
Will Waymel
@willwaymel
Jun 13 2017 14:04
@AlexanderDom
blob
Alexander Domikov
@AlexanderDom
Jun 13 2017 14:05
Capture d’écran 2017-06-13 à 16.05.04.png
by the way (mini-tip)
see Filter input
if you add a css rule there
magic gonna happen ^^
it seems like its hover styles that applied like said before, so you can remove it for mobile or change it for mobile
Will Waymel
@willwaymel
Jun 13 2017 14:11
sorry, what do you mean by filter input? also... I changed it now to only apply to bigger screens, but the default button hover style (white background) now does the same thing @AlexanderDom
Alexander Domikov
@AlexanderDom
Jun 13 2017 14:12
for filter
look at you print screen
upper from btn-default css rule
you have element style
and upper filter
if you type for exemple margin inside filter, it gonna show you all css rules that have margin in it :)
Will Waymel
@willwaymel
Jun 13 2017 14:15
@AlexanderDom got it! thanks
CamperBot
@camperbot
Jun 13 2017 14:15
willwaymel sends brownie points to @alexanderdom :sparkles: :thumbsup: :sparkles:
:warning: willwaymel already gave alexanderdom points
CMT95
@CMT95
Jun 13 2017 14:20
can someone help me with html in codepen?
Eric Weiss
@eweiss17
Jun 13 2017 14:21
yes what is it?
CMT95
@CMT95
Jun 13 2017 14:22
i would like to make a BS navbar for portfolio webpage, but it wont show anything
Eric Weiss
@eweiss17
Jun 13 2017 14:23
did u make sure to include bs in the settings
CMT95
@CMT95
Jun 13 2017 14:23
yes
Eric Weiss
@eweiss17
Jun 13 2017 14:29
link your pen
sele
@monsele
Jun 13 2017 14:30
please how do write text and put contents on your image because am trying to create a portfolio page
Will Waymel
@willwaymel
Jun 13 2017 14:32
@AlexanderDom btw... I mean I got it (the filtering function in the devtools), still haven't solved the button depressed look of the mobile browser
CMT95
@CMT95
Jun 13 2017 14:33
@eweiss17 thank u but have to go
CamperBot
@camperbot
Jun 13 2017 14:33
cmt95 sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 471 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Kaz Baig
@kbaig
Jun 13 2017 14:34
@monsele you could set the background as the image
nitishptl
@nitishptl
Jun 13 2017 14:35
In the portfolio project, what do they mean by adding project placeholders?
Juan Pablo Jaramillo
@JuanP97
Jun 13 2017 14:37
Guys, I'm having a very weird behavior in my code. It is supposed to create a <li> with some children on html for each index of an array. However, the '$content' is only being created for the last index. Anybody knows whats going on? Here's the code:
  function createListHTML (streamer) {
        console.log(streamer);
        for (var k in streamer) {
            if (streamer[k].streaming_status != "Offline") {
                console.log(streamer[k].name);

                   var listParent = $(".results_list");

                   var $li = $("<li>").addClass("result")
                                    .appendTo(listParent);

                   var $link = $("<a>").addClass("link_to_streamer")
                                            .attr("href", streamer[k].linkToStream)
                                            .appendTo($li);
                   var $content = $("h3").addClass("name")
                                          .text(streamer[k].name)
                                          .appendTo($link);
            } else {
                console.log(streamer[k].name + " is offline");
            }
        }
    }
Eric Weiss
@eweiss17
Jun 13 2017 14:40
@nitishptl Like previews of projects you did. But because this is your first one, a placeholder would just be a Box with 'Coming Soon' or something similar
@JuanP97 I found a syntax error in the first line
there should be no space between your createListHTML and (streamer)
M-C-Haker
@M-C-Haker
Jun 13 2017 15:13
can someone help me solve a couple annoying issues: 1)Two of my social media links aren't displaying 2) The alignment of my contact form is off. I can't get the names to line up right.
Yahia
@y-zaky
Jun 13 2017 15:14
hey guys, i have a question.
Is there a way for me to make the numbers in my calculator aligned without separating the html into elements row1, row2, ect?
M-C-Haker
@M-C-Haker
Jun 13 2017 15:15
also, can someone point me to a good resource for making the navbar collapse when it's not in full screen?
Yahia
@y-zaky
Jun 13 2017 15:16
Also why is it, that the top row of my calculator should be AC,CE,+,DIVide, but instead this has become the first colum
M-C-Haker
@M-C-Haker
Jun 13 2017 15:18
@bowssy88 you should probably use the rows class, that's what its there for
Eric Weiss
@eweiss17
Jun 13 2017 15:20
@bowssy88 I enjoy how different your calculator looks compared to standard calculators
Yahia
@y-zaky
Jun 13 2017 15:20
@M-C-Haker I'm trying to write this with no frameworks
if the rows class available in vanilla css?
Eric Weiss
@eweiss17
Jun 13 2017 15:20
calc.PNG
Yahia
@y-zaky
Jun 13 2017 15:20
@eweiss17 lol I'm trying to fix it !!!!
Eric Weiss
@eweiss17
Jun 13 2017 15:20
lol just thought it was funny
alican karalar
@alicankaralar
Jun 13 2017 15:20
const init =
  "Heading \n======= \n\nSub-heading \n-----------\n\n ### Another deeper heading\n\n Paragraphs are separated \n by a blank line. \n\n Leave 2 spaces at the end of a line to do a  \n line break \n\n Text attributes *italic*, **bold**, `monospace`, ~~strikethrough~~ . \n Shopping list: \n\n  * apples\n  * oranges\n  * pears\n\n\nNumbered list:\n\n  1. apples\n  2. oranges\n  3. pears\n\nThe rain---not the reign---in\nSpain.\n\n *[Herman Fassett](https://freecodecamp.com/hermanfassett)*";

class Textarea extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      value: init
    };
    this.handleChange = this.handleChange.bind(this);
  }
  handleChange(event) {
    this.setState({ value: event.target.value });
  }

  render() {
    return (
      <div>
        <div className="header"><h1>Markdown Previewer</h1></div>
        <div className="container">
          <textarea
            className="textarea"
            rows="50"
            cols="70"
            onChange={this.handleChange}
            value={this.state.value}
          >
            {" "}
            hello
            {" "}
          </textarea>
          <Markdown value={this.state.value} />
        </div>
      </div>
    );
  }
}
class Markdown extends React.Component {
  constructor(props) {
    super(props);
  }
  renderValue(input) {
    var markedinput = marked(input, { sanitize: true });
    return { __html: markedinput };
  }
  render() {
    return (
      <span
        className="output"
        dangerouslySetInnerHTML={this.renderValue(this.props.value)}
      />
    );
  }
}

ReactDOM.render(<Textarea />, document.getElementById("root"));
this doesn’t compile in babel for codepen, any ideas why?
Yahia
@y-zaky
Jun 13 2017 15:21
@eweiss17 could you help teach me the way to format this thing
i have separated it into rows in the html.... so why is it appearing like that lool
M-C-Haker
@M-C-Haker
Jun 13 2017 15:21
@bowssy88 it's an bootstrap thing, i believe. don't need css
Eric Weiss
@eweiss17
Jun 13 2017 15:22
well you don't have bootstrap in your project
that is your first problem
I am assuming that you want to use the bootstrap grid?
M-C-Haker
@M-C-Haker
Jun 13 2017 15:23
@eweiss17 when you get a chance could you give me some direction on this? recognize your name from previous help lol @M-C-Haker
can someone help me solve a couple annoying issues: 1)Two of my social media links aren't displaying 2) The alignment of my contact form is off. I can't get the names to line up right.
https://codepen.io/M-C-Haker/full/mwEWvq/
Yahia
@y-zaky
Jun 13 2017 15:23
well i want to do the entire thing in vanilla css, no frameworks.. @eweiss17
Eric Weiss
@eweiss17
Jun 13 2017 15:24
@bowssy88 mmm mine is still a work in progress but the buttons are almost right... https://codepen.io/eweiss17/pen/gmwjoM
i believe I used flexbox
my numbers have display:flex
it's been a while
Yahia
@y-zaky
Jun 13 2017 15:26
@eweiss17 hmmm can u hit refresh on my codepen, I've made them all display flex
now its a very loooooong calculator lool
the rows
need to be on top of each other
BrunoM24
@BrunoM24
Jun 13 2017 15:26
Eric Weiss
@eweiss17
Jun 13 2017 15:27
@bowssy88 haha, it actually looks kinda better though
Yahia
@y-zaky
Jun 13 2017 15:28
loool
Eric Weiss
@eweiss17
Jun 13 2017 15:28
@M-C-Haker you wanted facebook and what other social media
flex-wrap: wrap
I also shoved it into a div with predefined dimensions
height: width: ... ect
BrunoM24
@BrunoM24
Jun 13 2017 15:29
@eweiss17 your calculator isnt chaining the results
Eric Weiss
@eweiss17
Jun 13 2017 15:29
@BrunoM24 ya, lol work in progress
BrunoM24
@BrunoM24
Jun 13 2017 15:30
@eweiss17 but you have the visual, I have the functionality but not the visual, I think I will need help in the visual
Eric Weiss
@eweiss17
Jun 13 2017 15:31
my visual is not complete yet..... it's stil la work in progress as well
M-C-Haker
@M-C-Haker
Jun 13 2017 15:31
@eweiss17 ok thanks for that
CamperBot
@camperbot
Jun 13 2017 15:31
m-c-haker sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 472 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 13 2017 15:31
@M-C-Haker sorry everythign i said below what i mentioend you earlier was for other guy
@M-C-Haker do you know the fa icons? try those for your social medias
as far as your form not lining up
@BrunoM24 you will see what is wrong with my calc if u open concole, after clicking =, there is still an op left in my stack, there shouldn't be
denizenofcode
@denizenofcode
Jun 13 2017 15:44
Can someone please help me figure out how to make the brown div in the middle of my page have a static height?
Kaz Baig
@kbaig
Jun 13 2017 15:48
@denizenofcode declare its height
denizenofcode
@denizenofcode
Jun 13 2017 15:52
@kbaig Thank you!
CamperBot
@camperbot
Jun 13 2017 15:52
denizenofcode sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 300 | @kbaig |http://www.freecodecamp.com/kbaig
Dicko Finus Natawijaya
@dickofn
Jun 13 2017 16:00
https://www.freecodecamp.com/challenges/build-a-tribute-page
about this challange, I may write about anyone i like?
denizenofcode
@denizenofcode
Jun 13 2017 16:01
@dickofn Yes
Dicko Finus Natawijaya
@dickofn
Jun 13 2017 16:01
anyway sorry for my bad English and @denizenofcode thanks
CamperBot
@camperbot
Jun 13 2017 16:01
dickofn sends brownie points to @denizenofcode :sparkles: :thumbsup: :sparkles:
:cookie: 259 | @denizenofcode |http://www.freecodecamp.com/denizenofcode
Tatwamsiddha
@Tatwamsiddha-Nanda
Jun 13 2017 16:06
how do get to understand jquery?
the challenges preceding random quote machine are just Ctrl+C ctrl+V type
also the things are read from w3schools seem to be different
where should i read these stuff from
shivam gupta
@shivamg11000
Jun 13 2017 16:16
@Tatwamsiddha-Nanda learn jquery from codeacademy, https://www.codecademy.com/learn/jquery
then try to build simple think like image slider like this https://shivamg11000.github.io/webdev-learning-img-slider/
Mark R. Baker
@mrbaker1917
Jun 13 2017 16:19
Hello all. Where can I find some information on how to link my random quote machine to fb and twitter? I want to allow the user to click on the appropriate icon and post the particular quote on that corresponding website.
any clue why i can't add anything here?
i tried to learn from 2 other codepens
shivam gupta
@shivamg11000
Jun 13 2017 16:22
@D3V4N5H what you mean by add?
Devansh Trivedi
@D3V4N5H
Jun 13 2017 16:22
the ("quote").html("") doesn't seem to work
@shivamg11000 frankly i have no idea what's wrong
such a simple code
shivam gupta
@shivamg11000
Jun 13 2017 16:23
@D3V4N5H go to settings , javascript, quick add , select jquery
in you pen
Devansh Trivedi
@D3V4N5H
Jun 13 2017 16:23
oh, works like charm
thanks a bunch @shivamg11000
CamperBot
@camperbot
Jun 13 2017 16:23
d3v4n5h sends brownie points to @shivamg11000 :sparkles: :thumbsup: :sparkles:
:cookie: 278 | @shivamg11000 |http://www.freecodecamp.com/shivamg11000
shivam gupta
@shivamg11000
Jun 13 2017 16:24
dont forget to save
Devansh Trivedi
@D3V4N5H
Jun 13 2017 16:24
semper fi
mrgrizzlie33
@mrgrizzlie33
Jun 13 2017 16:31
How important are <lists> and <ul>?
JD Tadlock
@jdtdesigns
Jun 13 2017 16:34
@mrgrizzlie33 <lists> aren't html, but <ul>'s are. UL's and OL's are simply for listing items in an organized fashion(bulleted,numbered, ect.).
Hussain Haider
@HussainHaider
Jun 13 2017 16:36
Hello everyone!! I'm currently working on Random Quote machine Project The Problem is that I link the quote api but its not working ...Kindly help me ...Here is my Project https://codepen.io/Syed_Hussain/pen/xrOMjr
JD Tadlock
@jdtdesigns
Jun 13 2017 16:39
@HussainHaider change http://quotesondesign... to https://quotesondesign...
requesting through http when your site is loaded over https will cause a mixed content error. This just means you're on a secure server, so unsecure requests such as calls to http://blah.com will be blocked to prevent bad guys from stealing data.
Hussain Haider
@HussainHaider
Jun 13 2017 16:42
@jdtdesigns thank you boy
CamperBot
@camperbot
Jun 13 2017 16:42
hussainhaider sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1026 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
BrunoM24
@BrunoM24
Jun 13 2017 17:00
Yahia
@y-zaky
Jun 13 2017 17:00
hi guys
how do i align the rows properly
my row top is appearing vertical for some reason... same is true with row1, row2
ect..
Markus Ivancsics
@ivancsicsmarkus
Jun 13 2017 17:02
@bowssy88 What do you mean align?
JD Tadlock
@jdtdesigns
Jun 13 2017 17:03
@BrunoM24 You might have a couple of bugs to work out. ;) https://image.prntscr.com/image/6Gu-Iv3hQSWbpVm8ANnsSA.png
Yahia
@y-zaky
Jun 13 2017 17:03
it should be Ac CE DIVIDE * on the TOP ROW
@ivancsicsmarkus
then 789- on the second row
then 567 3rd row
ect
but for some reason they have become columns instead of rows? ac ce divide * are vertical instead of horizontal
Markus Ivancsics
@ivancsicsmarkus
Jun 13 2017 17:07
@bowssy88 It is interesting.
@bowssy88 There are problems with your rows.
@bowssy88 You should specify those more as a row.
Yahia
@y-zaky
Jun 13 2017 17:08
how? i am using vanilla css only no frameworks
Markus Ivancsics
@ivancsicsmarkus
Jun 13 2017 17:08

@bowssy88 It is pretty complicated to write it down. You should read this: https://hashnode.com/post/really-responsive-tables-using-css3-flexbox-cijzbxd8n00pwvm53sl4l42cx

I learnt everything from that article.

@bowssy88 It is really short.
BrunoM24
@BrunoM24
Jun 13 2017 17:09
@jdtdesigns Done!
Aata-allah
@Atalaa
Jun 13 2017 17:17
Guys i have 3 files in my github project (HTML, JS, CSS) but in the Overview it show CSS but i want it to show Javascript, how can i do that ?
JD Tadlock
@jdtdesigns
Jun 13 2017 17:21
@bowssy88 Here's an example of how to go about it with flexbox. Not sure why you're using inline-flex. Also, you have src="#" on all the buttons. Buttons don't have that attribute. Don't use margins to create width. Margin is for pushing other elements away. https://codepen.io/jdtadlock/pen/vZKPdq?editors=0100
@Atalaa Not sure what you mean.
Aata-allah
@Atalaa
Jun 13 2017 17:23
@jdtdesigns in github u have a overview section, with your project, every project have a name language qith a color right? I want to display Javascript but when i create my repository it display CSS
in github u have a overview section, with your project, every project have a name language with a color right? I want to display Javascript but when i create my repository it display CSS
Yahia
@y-zaky
Jun 13 2017 17:25
thank you, sir you are a legend @jdtdesigns
CamperBot
@camperbot
Jun 13 2017 17:25
bowssy88 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1027 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Yahia
@y-zaky
Jun 13 2017 17:27
@jdtdesigns you used .row .colum , however there is no element with the colum class in the html? where did the .colum come from?
syllov
@syllov
Jun 13 2017 17:28
can someone please tell me how to get (raw) json data from this API? i've been trying to figure this out for days now.. :/
api: https://api.darksky.net/forecast/0df4e72cb673ba1aef24b98229f0f9cd/40.730610, -73.935242
JD Tadlock
@jdtdesigns
Jun 13 2017 17:28
@Atalaa It's just a package that reads your files and selects a language from one of them. It's not a big deal as everyone knows it's just an algorithm. To be honest, 99% of people aren't going to pay attention to the language on your overview or even see your overview. They will go to a repository you link.
JD Tadlock
@jdtdesigns
Jun 13 2017 17:29
@bowssy88 <div class="calculatorArea column y-center">
Aata-allah
@Atalaa
Jun 13 2017 17:29
@jdtdesigns thank you
CamperBot
@camperbot
Jun 13 2017 17:29
atalaa sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1028 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jun 13 2017 17:31
@syllov I feel your pain. Been there before :P
$.getJSON('https://api.darksky.net/forecast/0df4e72cb673ba1aef24b98229f0f9cd/40.730610,-73.935242?callback=?')
.then(function(data) {
  console.log(data);
});
Yahia
@y-zaky
Jun 13 2017 17:32
@jdtdesigns why 3 classes though , why not make them all one class ?
why do you need to separate to column, y-center , and calculatorarea
syllov
@syllov
Jun 13 2017 17:32
@jdtdesigns thank you so much!
CamperBot
@camperbot
Jun 13 2017 17:32
syllov sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1029 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Ahmed Salah Eldin Elkashef
@AhmedElkashef02
Jun 13 2017 17:33
<style>
  $text-color: red;
  .header{
    text-align: center;
  }
  .blog-post h2 {
    color: $text-color;
  }
</style>
Hey guys, this sass code doesn't read the variable $text-color .. any ideas?
JD Tadlock
@jdtdesigns
Jun 13 2017 17:33
@bowssy88 Those are global classes. You would use those over and over in your html. You don't want all your columns centered so for those, you would just use .column. ;)
@AhmedElkashef02 Probably because that's not Sass. :P
How are you compiling that down to css?
Ahmed Salah Eldin Elkashef
@AhmedElkashef02
Jun 13 2017 17:35
I am leaving it to the beta version of fcc, this is the link to the challenge:
http://beta.freecodecamp.com/en/challenges/sass/store-data-with-sass-variables
firas omrane
@firou1925
Jun 13 2017 17:35
hello world
yardr
@yardr
Jun 13 2017 17:38
Could someone help me to align text within links vertically? Here's the code: https://jsfiddle.net/yarik/mq9ydc65/4/#&togetherjs=DqoJDtldd3
firas omrane
@firou1925
Jun 13 2017 17:43
hello world
JD Tadlock
@jdtdesigns
Jun 13 2017 17:45
@AhmedElkashef02 There's an error with FCC's processor. Do this until they get it fixed
color: $text-color;
color: red;
Ahmed Salah Eldin Elkashef
@AhmedElkashef02
Jun 13 2017 17:48
oh thanks!
@jdtdesigns thanks!
CamperBot
@camperbot
Jun 13 2017 17:48
ahmedelkashef02 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1030 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Randy Goldsmith
@Dueldrawer8
Jun 13 2017 17:49
var grabQuote = document.getElementsByClassName('quote');
document.getElementById('loadQuote').addEventListener("click", printQuote);


var quotes = [
{ 
    quote: 'You can make more friends in two months by becoming interested in other people than you can in two years by trying to get other people interested in you.',
    source: 'Dale Carnegie',
    citation: 'How to Win Friends and Influence People',
    year: 1986
},
{
    quote: 'I went to a bookstore and asked the saleswoman, "Where\'s the self-help section?" She said if she told me, it would defeat the purpose.', 
    source:  'George Carlin'
},
{
    quote: 'Anger, resentment and jealousy doesn\'t change the heart of others-- it only changes yours.',
    source: 'Shannon L. Alder',
    citation: '300 Questions to Ask Your Parents Before It\'s Too Late'
},
{
    quote: 'The only time you fail is when you fall down and stay down',
    source: 'Cosmic Ordering: You can be successful'
},
{
    quote: 'Always be fearless. Walk like lion, talk like pigeons, live like elephants and love like an infant child.',
    source: 'Santosh Kalwar',
    citation: 'Quote Me Everyday',
    year: 2010
}
];

function getRandomQuote() {
    //look into the quote array
    //randomly choose a quote somehow
    return quotes[Math.floor(Math.random() * quotes.length)][0];
     //use the math.random generator
};

function printQuote() {
    var getQuote = getRandomQuote();
    //get the selection of where the quote goes
     grabQuote.textContent = 'I was clicked';
}
could someone explain to me why my button isn't changing text whenever i click it?
firas omrane
@firou1925
Jun 13 2017 17:50
hello world
Randy Goldsmith
@Dueldrawer8
Jun 13 2017 17:50
first line of code if i change from getElementsByClassName to querySelector.. it works
here is my html...
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Random Quotes</title>
  <link href='https://fonts.googleapis.com/css?family=Playfair+Display:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="css/styles.css">
</head>
<body>
  <div class="container">
    <div id="quote-box">
      <p class="quote">You can do anything but not everything</p>
      <p class="source">David Allen<span class="citation">Making It All Work</span><span class="year">2009</span></p>
    </div>
    <button id="loadQuote">Show another quote</button>
  </div>
  <script src="js/script.js"></script>
</body>
</html>
JD Tadlock
@jdtdesigns
Jun 13 2017 17:56
@Dueldrawer8 getElementsByClassName() grabs multiple elements. It's usually used to iterate over a group. If you just have one, you could do getElementsByClassName('quote')[0]
Randy Goldsmith
@Dueldrawer8
Jun 13 2017 17:57
so even if i have just one .quote class, it wont grab that just one without doing ('quote')[0]>
?
@jdtdesigns thank you
CamperBot
@camperbot
Jun 13 2017 18:02
dueldrawer8 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:star2: 1031 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
Gulsvi
@gulsvi
Jun 13 2017 18:03
@Dueldrawer8 Yes, it always returns an array-like object - even if there's only one match https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
Sometimes it's easier to use getElementById if you only plan on having one element.
tommy
@tommygebru
Jun 13 2017 18:09
This message was deleted
teresa
@bitingteresa
Jun 13 2017 18:09
const USERS = ['ESL_SC2', 'OgamingSC2', 'cretetion', 'freecodecamp', 'storbeck', 'habathcx', 'RobotCaleb', 'noobs2ninjas', 'brunofin', 'comster404'];

 getUsers () {
    const userURL = 'https://wind-bow.glitch.me/twitch-api/users/';
    let tempUsers = {};

    USERS.forEach(user => {
      fetch(userURL + user)
        .then(res => res.json())
        .then(data => {
          tempUsers[user] = data;
        }); 
     })
  }
hey I'm doing the twitch challenge and I'm trying to execute synchronously in React with the fetch polyfill. Does anyone have any suggestions? I tried async/await but I was getting random errors from codepen...
peckpeck20
@peckpeck20
Jun 13 2017 18:09

Hello guys I was wondering if someone could point me in the right direction.
I'm working in this tribute page >> https://codepen.io/ZapataJose/pen/JJPrmb

i made a class called subTitle that should set the text to green and center it, it works on the 1st call but on the second one it shows the color but its not centering

BrianWilliams28
@BrianWilliams28
Jun 13 2017 18:10
this is what I have so far for showing the local weather, I can see it from my computer but not my phone. can someone take a look and tell me if it shows the weather for them?
https://codepen.io/BrianWilliams28/full/BRrOgg/
Randy Goldsmith
@Dueldrawer8
Jun 13 2017 18:11
@SkyC0der thank you
CamperBot
@camperbot
Jun 13 2017 18:11
dueldrawer8 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1686 | @skyc0der |http://www.freecodecamp.com/skyc0der
tommy
@tommygebru
Jun 13 2017 18:12
@peckpeck20 unless im mistaken the class is only affecting the html you bind it too.. therefore the h5 are centered within their respective divs/parent elements
nitishptl
@nitishptl
Jun 13 2017 18:13
Can anyone give feedback on my portfolio page? https://codepen.io/nitishptl/full/yXJzzN
ms-dosx86
@ms-dosx86
Jun 13 2017 18:13
how to change HTML with jQuery?
or JS
tommy
@tommygebru
Jun 13 2017 18:13
@BrianWilliams28 not seeing the weather
Screen Shot 2017-06-13 at 11.14.48 AM.png
BrianWilliams28
@BrianWilliams28
Jun 13 2017 18:13
@tommygebru are you checking from computer or phone?
Gulsvi
@gulsvi
Jun 13 2017 18:14
@bitingteresa fetch() returns a promise, so you want to populate the array with a fetch call for each user, and then run promise.all on the array.
@BrianWilliams28 computer
Gulsvi
@gulsvi
Jun 13 2017 18:16
@bitingteresa Or, something like:
const USERS = ['ESL_SC2', 'OgamingSC2', 'cretetion', 'freecodecamp', 'storbeck', 'habathcx', 'RobotCaleb', 'noobs2ninjas', 'brunofin', 'comster404'];

function getUsers(user) {
  const userURL = "https://wind-bow.glitch.me/twitch-api/users/";
  return fetch(userURL + user).then(res => res.json());
}

USERS.forEach(user => getUsers(user).then(processUsers));

function processUsers(data) {
  console.log(data); // do something with the data here
}
^^ but that's going to call each user one at a time where promise.all would call them all at once I believe
tommy
@tommygebru
Jun 13 2017 18:18
@nitishptl great effort so far, you can improve the button by giving the text and icon, a space between the elements
<i class="fa fa-paper-plane">SUBMIT</i> vs <i class="fa fa-paper-plane"> SUBMIT</i>
Gulsvi
@gulsvi
Jun 13 2017 18:19
@BrianWilliams28 Depending on what phone/browser you're using, you may need to enable the Babel preprocessor. It will transpile your ES6 to ES5 for compatibility. Click the gear icon next to "JS" in your JS Panel of codepen and select Babel from the preprocessor dropdown.
tommy
@tommygebru
Jun 13 2017 18:21
Anyone can give a tip why the css is not engaging in this simple bar chart?
https://codepen.io/gebrutommy/pen/OgXPgO
peckpeck20
@peckpeck20
Jun 13 2017 18:21
@tommygebru you were right ! thanks dude :D
CamperBot
@camperbot
Jun 13 2017 18:21
:cookie: 808 | @tommygebru |http://www.freecodecamp.com/tommygebru
peckpeck20 sends brownie points to @tommygebru :sparkles: :thumbsup: :sparkles:
ms-dosx86
@ms-dosx86
Jun 13 2017 18:22
@tommygebru thank
CamperBot
@camperbot
Jun 13 2017 18:22
ms-dosx86 sends brownie points to @tommygebru :sparkles: :thumbsup: :sparkles:
:cookie: 809 | @tommygebru |http://www.freecodecamp.com/tommygebru
Gulsvi
@gulsvi
Jun 13 2017 18:23
nvm :)
nitishptl
@nitishptl
Jun 13 2017 18:29
@tommygebru How good is my webpage assuming I started fcc two days ago?
tommy
@tommygebru
Jun 13 2017 18:30
its fine - your projects will only get better with time!
in fact I encourage you to update all your fcc projects even the tribute!!
if you learn something new about html, css, or just best practices of coding apply it to existing projects, not new ones!!
@nitishptl
nitishptl
@nitishptl
Jun 13 2017 18:35
thank you for you feedback @tommygebru
CamperBot
@camperbot
Jun 13 2017 18:35
nitishptl sends brownie points to @tommygebru :sparkles: :thumbsup: :sparkles:
:cookie: 810 | @tommygebru |http://www.freecodecamp.com/tommygebru
Yahia
@y-zaky
Jun 13 2017 18:36
@jdtdesigns hey dude , I'm trying to move my equal sign to be next to the 3
tommy
@tommygebru
Jun 13 2017 18:36
@nitishptl this is probably the best advice to give when learning and building projects - from my experience, focusing to make your projects quality with time,
vanecho2
@vanecho2
Jun 13 2017 18:37
Could someone please help me determine why my image goes past the div container on my tribute page? https://codepen.io/rvanecho/pen/weWZQm?editors=1010
Yahia
@y-zaky
Jun 13 2017 18:37
hi ! @SkyC0der hope your well
also guys, is *{ style here} equal to body {style here} ?
in css
Markus Ivancsics
@ivancsicsmarkus
Jun 13 2017 18:40
@bowssy88 Not really.
@bowssy88 * selects html too.
@bowssy88 Also, when you say body it just selects the body element, not all descandents (children).
@bowssy88 But * selects everything.
Jake
@sipofwater
Jun 13 2017 18:42
@vanecho2 Get in the habit of indenting your code properly. Much easier to debug code when it's clean looking. http://www.peachpit.com/articles/article.aspx?p=24011&seqNum=3
Yahia
@y-zaky
Jun 13 2017 18:42
Ok so * selects everything... but body selects body element only? hmm thought body element was everything @ivancsicsmarkus
Markus Ivancsics
@ivancsicsmarkus
Jun 13 2017 18:43
@bowssy88 No, it contains everything.
@bowssy88 It is like big div.
Yahia
@y-zaky
Jun 13 2017 18:44
@ivancsicsmarkus whats the benefit of using * instead of body
vanecho2
@vanecho2
Jun 13 2017 18:46
updating now - was just typing it with the side window so it was harder to see formatting
Gulsvi
@gulsvi
Jun 13 2017 18:46
@bowssy88 Hello
Was just looking at your calculator
Yahia
@y-zaky
Jun 13 2017 18:48
hi :)
Gulsvi
@gulsvi
Jun 13 2017 18:48
Are you trying to learn flex?
Markus Ivancsics
@ivancsicsmarkus
Jun 13 2017 18:48
@bowssy88 I would not use * for much things.

@bowssy88 I use it for two things in every project.

* {
    box-sizing: border-box;
    margin: 0;
}

This sets the box-sizing and the default margin. It is helpful for me.

Gulsvi
@gulsvi
Jun 13 2017 18:49
<body> is one thing, * is everything :)
Yahia
@y-zaky
Jun 13 2017 18:50
@SkyC0der yes i am xD
Sunny Wong
@swong194
Jun 13 2017 18:50
hi every1
Yahia
@y-zaky
Jun 13 2017 18:50
@ivancsicsmarkus thank you dude, why is that
CamperBot
@camperbot
Jun 13 2017 18:50
bowssy88 sends brownie points to @ivancsicsmarkus :sparkles: :thumbsup: :sparkles:
:cookie: 611 | @ivancsicsmarkus |http://www.freecodecamp.com/ivancsicsmarkus
Sunny Wong
@swong194
Jun 13 2017 18:50
im trying to build the random quote machine
was wondering where I can get the database for random quotes?
Gulsvi
@gulsvi
Jun 13 2017 18:51
@bowssy88 Flex might be a bit too much for calculator buttons, if you ask me. All of your <button> elements are inline elements and they'll wrap to the next line just like words in a sentence.
For your equals button, you can simply make it position absolute so it doesn't interfere with the wrapping of elements
Markus Ivancsics
@ivancsicsmarkus
Jun 13 2017 18:51
@bowssy88 I like to always set margins myself.
Connor
@Vacuouschimp
Jun 13 2017 18:52
Hello can any one help me create a nav bar that scrolls when i click it
Sunny Wong
@swong194
Jun 13 2017 18:53
connor do u mean the link u click it will move you to another part of the page?
@Vacuouschimp if so look up anchor tags
Connor
@Vacuouschimp
Jun 13 2017 18:53
Yes sunny
Sunny Wong
@swong194
Jun 13 2017 18:54
@Vacuouschimp anchor tags will help u, the syntax is just slightly different in linking to areas on the same page good luck
Connor
@Vacuouschimp
Jun 13 2017 18:54
i have not been taught how to creat nav bars this is new for me
Gulsvi
@gulsvi
Jun 13 2017 18:54
@Vacuouschimp Check out the "Create A Bookmark Link" section here: https://www.w3schools.com/html/html_links.asp
Sunny Wong
@swong194
Jun 13 2017 18:55
@Vacuouschimp navbars are essentially a list with hyperlinks
Connor
@Vacuouschimp
Jun 13 2017 18:55
@SkyC0der thanks helped alot
CamperBot
@camperbot
Jun 13 2017 18:55
vacuouschimp sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1687 | @skyc0der |http://www.freecodecamp.com/skyc0der
Connor
@Vacuouschimp
Jun 13 2017 18:55
thanks @swong194 @camperbot you helped alot also
CamperBot
@camperbot
Jun 13 2017 18:55
vacuouschimp sends brownie points to @swong194 and @camperbot :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @swong194 |http://www.freecodecamp.com/swong194
:star2: 3316 | @camperbot |http://www.freecodecamp.com/camperbot
Barbara Pentoney
@flyfishingbarbara
Jun 13 2017 18:56
hi peeps, i need help....working on tribute page. i wanna put 4 images at top of page.why is this code not then showing the image on codepen..?? <a href ="#" class = "thumbnail">
<img src = "https://www.shutterstock.com/image-illustration/trout-line-art-37643908" alt = "Trout thumbnail">
</a>
Yahia
@y-zaky
Jun 13 2017 18:56
@SkyC0der errr, made the position absolute, and moved it in the html to be next to the 3, but looks a little weird lol
Sunny Wong
@swong194
Jun 13 2017 18:57
@flyfishingbarbara i don't think u are linking to an actual picture O__O
Gulsvi
@gulsvi
Jun 13 2017 18:58
@bowssy88 Like this: https://s.codepen.io/skycoder/pen/qjNGqr?editors=0100
Just play around with the margins/padding/size to get the button where you need it
Barbara Pentoney
@flyfishingbarbara
Jun 13 2017 18:58
@swong194 isn't it a link to a line art of a trout..??
Sunny Wong
@swong194
Jun 13 2017 18:58
@flyfishingbarbara i would suggest downloading that picture and then uploading it onto imgur, unless someone else has a better solution
@flyfishingbarbara the link shows the entire page not just the img
try that
Andrew Hickman
@ahickman3
Jun 13 2017 19:00
anyone here use sublime? I cant get it to run my jquery code, seems like i need a library imported or something
Hello911
@Hello911
Jun 13 2017 19:00
Does anyone know how to make carousel plus animation? I dont where to start. I did a basic CSS carousel.
could someone tell me why it isn't working???
Barbara Pentoney
@flyfishingbarbara
Jun 13 2017 19:04
@swong194 okay so your link worked...now where did you get that link..?? ie do i have to create acct with shutterstock in order to get that exact link for lineart..??
Sunny Wong
@swong194
Jun 13 2017 19:04
@flyfishingbarbara i just clicked the picture of the trout, for most pictures u find try to open it in a new tab
@flyfishingbarbara if the url ends in .jpg ur usally good to go
Holly
@hollyewhite
Jun 13 2017 19:04
Hi there. Anyone worked with Skycons?
Barbara Pentoney
@flyfishingbarbara
Jun 13 2017 19:06
@swong194 okay i did notice your link had .jpg. thanks!!
CamperBot
@camperbot
Jun 13 2017 19:06
flyfishingbarbara sends brownie points to @swong194 :sparkles: :thumbsup: :sparkles:
:cookie: 267 | @swong194 |http://www.freecodecamp.com/swong194
Holly
@hollyewhite
Jun 13 2017 19:07
womp womp
Yahia
@y-zaky
Jun 13 2017 19:07
@SkyC0der thank you, ok so how did you do that without flex
CamperBot
@camperbot
Jun 13 2017 19:07
bowssy88 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1688 | @skyc0der |http://www.freecodecamp.com/skyc0der
Yahia
@y-zaky
Jun 13 2017 19:07
im amazed
Elliot S.
@SwarmSE
Jun 13 2017 19:08
@andrewmparker you need to capitalize Math
@andrewmparker you have it capitalized for the random function, but not the floor
andrewmparker
@andrewmparker
Jun 13 2017 19:11
thx @SwarmSE
CamperBot
@camperbot
Jun 13 2017 19:11
andrewmparker sends brownie points to @swarmse :sparkles: :thumbsup: :sparkles:
:cookie: 266 | @swarmse |http://www.freecodecamp.com/swarmse
Conrad Kay
@conradkay
Jun 13 2017 19:21
@conradkay
https://github.com/conradkay/myCounter
my react-redux app
if anyone would like to contribute, dm me or just start a pull request with your additions
Sunny Wong
@swong194
Jun 13 2017 19:21
Hi can anyone help me with the random quote machine
Barbara Pentoney
@flyfishingbarbara
Jun 13 2017 19:24
@swong194 so another question if u can help...why aren't my images of the trout - 4 little thumbnails all is a row...here's my code...<div class="row">
<div class="col-xs-3">
<a href ="#" class = "thumbnail">
<img src = "https://image.shutterstock.com/z/stock-phot....etc
BrianWilliams28
@BrianWilliams28
Jun 13 2017 19:33
@SkyC0der I just tried your suggestion. Can you see it now?https://codepen.io/BrianWilliams28/full/BRrOgg/
Sunny Wong
@swong194
Jun 13 2017 19:36
@flyfishingbarbara hi can u link ur pen?
andrewmparker
@andrewmparker
Jun 13 2017 19:45
what is the easiest way to get the quote on twitter?? https://codepen.io/andrewmparker/pen/gRMJjQ
mvroehling
@mvroehling
Jun 13 2017 19:47
Here is the anything I should further improve on the random quote? One bug is that it will never show the first quote in the array upon start, due to how I deal with duplicates
mrgrizzlie33
@mrgrizzlie33
Jun 13 2017 19:52
Hey guys, anyone interested in critiquing my portfolio page? I just finished and would like to have some constructive criticism of it.
Andrew Hickman
@ahickman3
Jun 13 2017 19:56
@mrgrizzlie33 looks kiinda 90's web page to me lol also, the first bg image, i always like to have it stay centered when you scroll the web browser in instead of just being pushed to the side.
@mrgrizzlie33 but it also looks like you tried to incorporate a bunch of stuff, so id say thats more important than design. Showing that you know how to do stuff is awesome imo
syllov
@syllov
Jun 13 2017 19:57
  if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(function(position) {
    lat = position.coords.latitude;
    lon = position.coords.longitude;
  });
}
what's wrong here? its supposed to asign latitude to lat, and long. to lon.
Eric Weiss
@eweiss17
Jun 13 2017 19:59
navigator.geolocation returns a boolean?
mrgrizzlie33
@mrgrizzlie33
Jun 13 2017 20:01
@fullmetal7777 Thanks, yea I'm trying to work on eliminating the side-scrolling issue. Also, I'm not a very, erhhh, 'design-oriented' person, shall we say... so I just decided to do something simple on the design side of things.
CamperBot
@camperbot
Jun 13 2017 20:01
mrgrizzlie33 sends brownie points to @fullmetal7777 :sparkles: :thumbsup: :sparkles:
:cookie: 268 | @fullmetal7777 |http://www.freecodecamp.com/fullmetal7777
Eric Weiss
@eweiss17
Jun 13 2017 20:01
you want to post what you are getting as values instead?
Andrew Hickman
@ahickman3
Jun 13 2017 20:01
@mrgrizzlie33 same
syllov
@syllov
Jun 13 2017 20:01
@eweiss17 yes
Eric Weiss
@eweiss17
Jun 13 2017 20:02
lat = position.coords.latitude; is correct? what value does it give you?
Yahia
@y-zaky
Jun 13 2017 20:02
hey guys, can anyone make a suggestion as to where to even start for the JS of a calculator ?
@syllov run it in codepen so we can help you debug
Eric Weiss
@eweiss17
Jun 13 2017 20:03
@mrgrizzlie33 looks good for a first project
console.log(lat) doesnt return anything.. i think..
mrgrizzlie33
@mrgrizzlie33
Jun 13 2017 20:04
@eweiss17 thanks!
CamperBot
@camperbot
Jun 13 2017 20:04
mrgrizzlie33 sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 473 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 13 2017 20:04
@syllov it works.
@syllov it is displaying my correct lat and lon in console
@syllov put the console.log's right below where you declare, not outside
syllov
@syllov
Jun 13 2017 20:05
@eweiss17 hm... doesnt for me
Eric Weiss
@eweiss17
Jun 13 2017 20:05
looks like you have an out of scope problem
syllov
@syllov
Jun 13 2017 20:05
@eweiss17 oh ok
@eweiss17 so it only works withing the function?
Eric Weiss
@eweiss17
Jun 13 2017 20:06
you declared lat and lon as globals
but i guess it doesn't like that
Elliot S.
@SwarmSE
Jun 13 2017 20:06
any feedback on my twitch challenge?
https://codepen.io/swarmse/full/gRMBeQ/
Eric Weiss
@eweiss17
Jun 13 2017 20:07
is it okay if you just use the lon and lat within that section?
syllov
@syllov
Jun 13 2017 20:08
@eweiss17 maybe, I can try
Eric Weiss
@eweiss17
Jun 13 2017 20:10
@SwarmSE wow that looks real good. Nothing hard coded?
Elliot S.
@SwarmSE
Jun 13 2017 20:13
@eweiss17 just the twitcher names as far as i can remember, wanted it to make it useable outside of FCC
Zach Upshaw
@zlupshaw
Jun 13 2017 20:14
Hey everyone! Hopefully this is the correct place to ask this. I'm trying to have two boxes side by side within a div. However, when I try to do this, it bleeds out of my main div box. I tried to correct this by using bootstrap and just doing the xs panels but it's acting as if I just put my div's below one another. (hopefully that all made sense)
https://codepen.io/zlupshaw/details/bRePVN/
Eric Weiss
@eweiss17
Jun 13 2017 20:15
I like yours better. I messed up with using a table to store all my data, but was too deep into it to want to change it
The channel of find channel for login "brunofin" , well that is broken
Elliot S.
@SwarmSE
Jun 13 2017 20:17
@eweiss17 I hear ya, i actually scrapped one revision of this due to how I was handling the JSON calls.
Eric Weiss
@eweiss17
Jun 13 2017 20:18
payed off, yours is real elegant, pretty much business quality
I enjoy a lot how my html is only 3 lines on mine
that is probably the coolest part
Elliot S.
@SwarmSE
Jun 13 2017 20:18
@eweiss17 thanks man! I like how you use a call to see what game they are playing. i may incorporate that
CamperBot
@camperbot
Jun 13 2017 20:18
swarmse sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 474 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Eric Weiss
@eweiss17
Jun 13 2017 20:19
@SwarmSE how did you get the game?
Curtis
@CurtisJCamp
Jun 13 2017 20:19
Hey @zlupshaw i ran into that exact problem yesterday and I think you should check out my portfolio codepen to see how I handled it.
https://codepen.io/CurtisjCamp/pen/jwrWXd
Elliot S.
@SwarmSE
Jun 13 2017 20:20
I didn't even add that functionality in
Eric Weiss
@eweiss17
Jun 13 2017 20:20
ohhhhh
Elliot S.
@SwarmSE
Jun 13 2017 20:20
but i'm about to :)
i noticed that you didn't use the online/offline sorting, were you having troubles with that?
Eric Weiss
@eweiss17
Jun 13 2017 20:21
it sometimes was in correct order... it seemed to have a mind of it's own
Curtis
@CurtisJCamp
Jun 13 2017 20:22
Eric Weiss
@eweiss17
Jun 13 2017 20:23
@SwarmSE doesn't really make sense though. I put the two deleted ones at the end and they are just like shoved at random spots
Elliot S.
@SwarmSE
Jun 13 2017 20:23
if you check out the JS on my pen, you might get an idea of how to do it like i did.
@eweiss17 that's because getJSON calls are made asynchronously, I was puzzled by that for a while as well
Eric Weiss
@eweiss17
Jun 13 2017 20:25
mine uses a table
like a said kind of my downfall
Gulsvi
@gulsvi
Jun 13 2017 20:26
@bowssy88 Your calculator is a static size, so using flexbox or even a framework like bootstrap are not necessary. They're great for responsive design though.
Eric Weiss
@eweiss17
Jun 13 2017 20:26
the main difference is that you assign all your collected data in the same section, mine is in 3 places
i'm also using a call within a call, hah, i already turned it in, it's fine the way it is (not perfect)
Zach Upshaw
@zlupshaw
Jun 13 2017 20:29
@CurtisJCamp You're a true hero! That was exactly what I needed
@CurtisJCamp Thank you sir!
CamperBot
@camperbot
Jun 13 2017 20:30
zlupshaw sends brownie points to @curtisjcamp :sparkles: :thumbsup: :sparkles:
:cookie: 121 | @curtisjcamp |http://www.freecodecamp.com/curtisjcamp
Curtis
@CurtisJCamp
Jun 13 2017 20:31
No Problem!:)
@zlupshaw
Gulsvi
@gulsvi
Jun 13 2017 20:31
@BrianWilliams28 I was able to see it before - but I'm on the latest version of firefox + chrome which both support your ES6 code. Was guessing it may not work on your mobile device because of ES6 - so transpiling with babel is usually a good fix for that.
Pal007
@Pal007
Jun 13 2017 20:35
What do u guys think about this tribute page? This is my first webpage, i tried to keep it as simple as possible. https://codepen.io/Pal007/full/RgRdLz/
Hemakshi Sachdev
@hemakshis
Jun 13 2017 20:36
Hey guys!! I have just started with my first project to make a tribute page..
As I am proceeding to make one a lot creative ideas are coming but they seem quite complicated as compared to the one shown as an example... I wanted to know that is it okay to make the page as we wish (even if it is a little complicated) or it has to be simple/similar to the example??
Sunny Wong
@swong194
Jun 13 2017 20:39
@hemakshis go for it. I think the point of freecodecamps exercises is to not only test the fundamentals in each assignment, but for you to add your own personality into each project.
Curtis
@CurtisJCamp
Jun 13 2017 20:40
The project can be as complex and challenging as you'd like it to be. If you plan on using it in your portfolio then I'd say to make it exactly how you want to.
Justas
@JustasKud
Jun 13 2017 20:48
I've been scratching my head for the past month, trying to replicate the scrolling mechanism as seen in this website ---> http://coffee-inn.com/#home
I think it takes the scrolling action (touchpad scroll, arrow keys & PgUp/Dn) and changes the whole page when an action is fired
but it does it so rapidly, so it doesn't send a request to the server to fetch a new page
can anyone help me xd
Gulsvi
@gulsvi
Jun 13 2017 20:57
@JustasKud This is called Scroll Jacking :) and is kind of frowned upon. They're using fullpage.js though
https://twitter.com/IMAC2/status/810812774557380609
Looks like jquery.kinetic is also used for some scroll acceleration: http://davetayls.me/jquery.kinetic/
Justas
@JustasKud
Jun 13 2017 21:01
@SkyC0der thank you so much!!! I understand it is not the best thing, but it's just personal preference for a very simple website xd
CamperBot
@camperbot
Jun 13 2017 21:01
justaskud sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1689 | @skyc0der |http://www.freecodecamp.com/skyc0der
Sunny Wong
@swong194
Jun 13 2017 21:01
hi every1
for the random quote machine, is the purpose of the exercise to test JSON,AJAX and API knowledge
Benjamin Hike
@BenJess
Jun 13 2017 21:02
@swong194 indeed :)
Sunny Wong
@swong194
Jun 13 2017 21:02
so it would be best to not use a plain javascript/jquery solution?
Gulsvi
@gulsvi
Jun 13 2017 21:03
@swong194 The main purpose is to start using JavaScript to build a website. You can use an API if you want, but will get a lot of practice with that in the next three projects; weather, wikipedia, and twitch.tv.
Try using an API though - it might actually be easier depending on your approach.
Sunny Wong
@swong194
Jun 13 2017 21:04
@SkyC0der @BenJess thanks
CamperBot
@camperbot
Jun 13 2017 21:04
swong194 sends brownie points to @skyc0der and @benjess :sparkles: :thumbsup: :sparkles:
:cookie: 314 | @benjess |http://www.freecodecamp.com/benjess
:star2: 1690 | @skyc0der |http://www.freecodecamp.com/skyc0der
Benjamin Hike
@BenJess
Jun 13 2017 21:05
@swong194 what you learn in the next 3 projects is actually pretty basic stuff if you plan on getting into serious coding later on. I def wouldnt do it with artificial arrays.
Alesiaa
@Alesiaa
Jun 13 2017 21:08
<p>View photos <a href="http://www.freecatphotoapp.com">cat photos</a>.</p>
can you help me?what am i doing wrong?
thanks
anyone?
Justas
@JustasKud
Jun 13 2017 21:11
try this <p>View photos <a href="http://www.freecatphotoapp.com"><span>cat photos</span></a>.</p>
@Alesiaa
Currently I don't see a problem, but my intuition told me to add spans xd
BrianWilliams28
@BrianWilliams28
Jun 13 2017 21:12
@SkyC0der can you see the weather now?
https://codepen.io/BrianWilliams28/full/BRrOgg/
Alesiaa
@Alesiaa
Jun 13 2017 21:12
no,not working
maybe i put it in a wrong place
Gulsvi
@gulsvi
Jun 13 2017 21:12
@Alesiaa Remove the period . at the end.
Justas
@JustasKud
Jun 13 2017 21:12
what are the requirements?
Gulsvi
@gulsvi
Jun 13 2017 21:12
<p>View more <a href="http://www.freecatphotoapp.com">cat photos</a></p>
And use view more not view photos
Alesiaa
@Alesiaa
Jun 13 2017 21:13
i got it,thanks! it was ok, i do not know why at that moment was not working
thanks guys ;)
Gulsvi
@gulsvi
Jun 13 2017 21:14
Your p element should have the text "View more " (with a space after it).
Lucci Paula
@luccipaula
Jun 13 2017 21:20
Does anyone know how I can align-right my bio to the left of the photo, and then have it above the photo on mobile?https://codepen.io/vivalucci/pen/LLZbMm
Kevin
@kevinwr
Jun 13 2017 21:24
Would anyone be willing to help me with the "Profile Lookup" challenge? A bit stuck.
Koleen BP
@KBPsystem777
Jun 13 2017 21:31
Hi guys, appreciate your suggestions for m tribute page: https://kbpsystem777.github.io/Shot/WebDev1.4.html
Lucci Paula
@luccipaula
Jun 13 2017 21:33
@KBPsystem777 I think that looks really good! Such a tragic death :(
CallMeOrange
@EgnaroDev
Jun 13 2017 21:33
@KBPsystem777 Nice project
Much better
Gulsvi
@gulsvi
Jun 13 2017 21:35
@caixeta-paula Remove your CSS for the image and the text that you're using currently and take advantage of the bootstrap grid - the sm size will make the text and image side by side, any size you want, on non-mobile screens.
If you don't specify xs it will be 100% wide on mobile sized screens
@FlawlessSardine I can try to help if you're stuck on that one
Kevin
@kevinwr
Jun 13 2017 21:37
@SkyC0der I can't seem to get my code to work. This is what I have:
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
// Only change code below this line
  for (i = 0; i < contacts.length; i++) {
    if (firstName == contacts[i].firstName) {
      if (contacts[i].hasOwnProperty(prop)) {
        return contacts[i].prop;
      }
    } 

    else if (firstName != contacts[i].firstName) {
        return "No such contact";
    } 

    else if (contacts[i].hasOwnPropert(prop) === false)
        return "No such property";
    }
// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Kristian", "lastName");

These are the instructions:

We have an array of objects representing different people in our contacts lists.

A lookUpProfile function that takes firstName and a property (prop) as arguments has been pre-written for you.

The function should check if firstName is an actual contact's firstName and the given property (prop) is a property of that contact.

If both are true, then return the "value" of that property.

If firstName does not correspond to any contacts then return "No such contact"

If prop does not correspond to any valid properties then return "No such property"

Gulsvi
@gulsvi
Jun 13 2017 21:39
I see one small typo in that last else if, but that isn't the issue
tsully
@tsully
Jun 13 2017 21:41
Hey All - I'm doing the weather app right now, and I'm having trouble returning the location of the user. I have a feeling the issue has to do with the locality of the coords_array variable, but I can't figure it out for sure.
var code = "
function getLocation(){
  var coords_array = [];
  if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(position) {
          var thisLatitude = position.coords.latitude;
          var thisLongitude = position.coords.longitude;
          var coords_array = thisLatitude + ',' + thisLongitude;
          /*console.log(coords_array); */
        }); 
    }
  return coords_array;
} 

console.log(getLocation());";
Conrad Kay
@conradkay
Jun 13 2017 21:41
@FlawlessSardine on the eigthy to last line you did .hasOwnPropert
tsully
@tsully
Jun 13 2017 21:42
Sorry, this is my first post. Let me try posting that code again:
function getLocation(){
  var coords_array = [];
  if (navigator.geolocation) {
        navigator.geolocation.getCurrentPosition(function(position) {
          var thisLatitude = position.coords.latitude;
          var thisLongitude = position.coords.longitude;
          var coords_array = thisLatitude + ',' + thisLongitude;
          /*console.log(coords_array); */
        }); 
    }
  return coords_array;
} 

console.log(getLocation());
Lucci Paula
@luccipaula
Jun 13 2017 21:43
@SkyC0der Thank you, I will do that now. I always forget to utilize the grid
CamperBot
@camperbot
Jun 13 2017 21:43
caixeta-paula sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1691 | @skyc0der |http://www.freecodecamp.com/skyc0der
Andrew Hickman
@ahickman3
Jun 13 2017 21:45
i keep getting errors in sublime regarding my jquery code, yet the jquery code executes as i would expect it. Any ideas why? http://prntscr.com/fjfqou
Gulsvi
@gulsvi
Jun 13 2017 21:46
@FlawlessSardine as a hint, you don't need any else if statements and you can return 'no such contact' outside of your loop.
Andrew Hickman
@ahickman3
Jun 13 2017 21:46
Not sure why its getting errors, but it would definately mess up me trying to debug stuff later on
:\
Gulsvi
@gulsvi
Jun 13 2017 21:53
@tsully navigator.geolocation takes some time to get your location - and javascript tries to run all at once. So, your return coords_array is running before you actually define the variable. As a result, you'll get undefined.
If you want to use that variable elsewhere in your code, it's easiest to pass it as an argument to another function
tsully
@tsully
Jun 13 2017 21:57
@SkyC0der Thank you! that's super helpful
CamperBot
@camperbot
Jun 13 2017 21:57
tsully sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1692 | @skyc0der |http://www.freecodecamp.com/skyc0der
Andrew Hickman
@ahickman3
Jun 13 2017 21:59
bump lol
Kevin
@kevinwr
Jun 13 2017 22:01
@SkyC0der hmmmm....still not seeing it. Found the typo though...thanks. Also, not sure why you wouldn't put "No such contact" in the loop.
CamperBot
@camperbot
Jun 13 2017 22:01
flawlesssardine sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1693 | @skyc0der |http://www.freecodecamp.com/skyc0der
ObtuseOwl
@ObtuseOwl
Jun 13 2017 22:02

Hey guys, why is my calculator's buttons acting weird when I move the size of the window (on desktop) and how do I fix it?

https://codepen.io/ObtuseOwl/pen/GEqQdw

I tried min-size but that doesn't work.
Kevin
@kevinwr
Jun 13 2017 22:05
Noticed a few braces were missing. Updated, and still doesn't work
function lookUpProfile(firstName, prop) {
// Only change code below this line
  for (i = 0; i < contacts.length; i++) {
    if (firstName == contacts[i].firstName) {
      if (contacts[i].hasOwnProperty(prop)) {
        return contacts[i].prop;
      }
    } 

    else if (firstName != contacts[i].firstName) {
        return "No such contact";
    } 

    else if (contacts[i].hasOwnProperty(prop) === false) {
        return "No such property";
    }
  }
// Only change code above this line
}
Gulsvi
@gulsvi
Jun 13 2017 22:10
@ObtuseOwl It's because you have them in responsive bootstrap columns. Treat the buttons like text on the screen - remove all the relative and absolute positioning along with the bootstrap columns and let the buttons wrap when they hit the edge of the calculator. No need to have buttons separated into different rows.
In the end, your tall equals button will need absolute positioning, but the rest can flow with the document without any fancy positioning or margin changing
ObtuseOwl
@ObtuseOwl
Jun 13 2017 22:10
@SkyC0der I couldn't figure out how to get the buttons to look like that without columns. I don't get why the buttons change when the container its in doesn't change.
So it's the Equals button?! That damn equals button...
Gulsvi
@gulsvi
Jun 13 2017 22:14
lol, yes, the equals button
It's easy to overcomplicate @ObtuseOwl just treat all the buttons like text and let them wrap until you get to that equals button.
Look at this if you get fed up: https://s.codepen.io/skycoder/pen/GEjKbz
Andrew Hickman
@ahickman3
Jun 13 2017 22:18
anyone here use sublime much? or have any recommendations for another program to use, because i cant get sublime to show errors properly with jquery lol
Gulsvi
@gulsvi
Jun 13 2017 22:18
Codepen :) lol
Honestly, I use Atom and haven't had any issues aside from really slow load times and shutdowns
works fine once it's up and running...but I'm on an old computer
Ravi Kishore Thella
@ravikishorethella
Jun 13 2017 22:19
@fullmetal7777 use brackets
Andrew Hickman
@ahickman3
Jun 13 2017 22:19
@ravikishorethella brackets?
ObtuseOwl
@ObtuseOwl
Jun 13 2017 22:19
@SkyC0der Wow, thanks man.
CamperBot
@camperbot
Jun 13 2017 22:19
obtuseowl sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1694 | @skyc0der |http://www.freecodecamp.com/skyc0der
Andrew Hickman
@ahickman3
Jun 13 2017 22:19
@ravikishorethella http://prntscr.com/fjg3zf
Ravi Kishore Thella
@ravikishorethella
Jun 13 2017 22:20
@fullmetal7777 it's a editor http://brackets.io
Andrew Hickman
@ahickman3
Jun 13 2017 22:20
@SkyC0der might try that if i cant get sublime figured out
Gulsvi
@gulsvi
Jun 13 2017 22:20
@fullmetal7777 How is your <head> set up in your HTML?
Seems like sublime just can't find jQuery
Andrew Hickman
@ahickman3
Jun 13 2017 22:21
@SkyC0der actually had issues with that earlier, but i got it figured out through this forum. I have the jquery script properly linked in the html head
<head>
        <title></title>
        <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
        <script src="https://use.fontawesome.com/5ad62430a6.js"></script>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <link rel="stylesheet" href="main.css">
    </head>
with the js script being right above the body closing tag
Gulsvi
@gulsvi
Jun 13 2017 22:22
@fullmetal7777 Your jQuery script should also be right before the closing </body> tag
(above your custom js file)
Andrew Hickman
@ahickman3
Jun 13 2017 22:23
@SkyC0der gtg for a bit, mind if i message you when i get back to get your ideas on what i should do differently?
Gulsvi
@gulsvi
Jun 13 2017 22:23
All <script> tags should go in the order they need to load right before the </body> tag
Andrew Hickman
@ahickman3
Jun 13 2017 22:23
i wont barrage you with messages, i promise lol
Gulsvi
@gulsvi
Jun 13 2017 22:23
That's all I can think of right now - feel free though
Dan Couper
@DanCouper
Jun 13 2017 22:43
Putting it in the head is fine nowadays, you just need to add defer to it - <script src="path/to/my/JSLibrary" defer>
The browser will parse the page then load the scripts in the order specified
tsully
@tsully
Jun 13 2017 22:47
I'm still having trouble with the geolocation code. I can't understand why the code below doesn't work:
function getLocation(){
  navigator.geolocation.getCurrentPosition(function(position) {
    someOtherFunction([position.coords.latitude, position.coords.longitude]);
  }); 
}

function someOtherFunction(coords) {
  return coords;
}

function testfunction(){
  var coordPair = getLocation();
  console.log(coordPair);
}
Gulsvi
@gulsvi
Jun 13 2017 23:01
@tsully You'll need to call testFunction() somewhere in your code, but when you do, it calls getLocation() and immediately returns undefined because it won't wait for navigator.geolocation to finish getting your location. You can't really assign a variable to the return value of an asynchronous function.

You have two options. Pass the return value to another function:

function getLocation(){
  navigator.geolocation.getCurrentPosition(function(position) {
    testfunction([position.coords.latitude, position.coords.longitude]);
  }); 
}

function testfunction(data){
  var coordPair = data;
  console.log(coordPair);
}

getLocation();

or, use a promise():

function getCoords() {
  return new Promise(function(res, rej) {
    navigator.geolocation.getCurrentPosition(res, rej)
  });
}

function showLocation(data) {
  console.log(data);
}

function handleErrors(err) {
  console.error(err);
}

getCoords()
  .then(showLocation)
  .catch(handleErrors);
tsully
@tsully
Jun 13 2017 23:03
@SkyC0der thanks for the detailed response. I'll try both and let you know how it goes
CamperBot
@camperbot
Jun 13 2017 23:03
tsully sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1695 | @skyc0der |http://www.freecodecamp.com/skyc0der
Kevin
@kevinwr
Jun 13 2017 23:15
This profile lookup challenge is going to be the death of me.
Eme
@Mezitek
Jun 13 2017 23:16

Hi guys. I'm having trouble getting these two divs to display side by side with bootstrap. One is an img, the other has a couple of h5 elements. If anyone can see what I'm doing wrong, it would be much appreciated!

<div class="my-div">

<div id="my-about" class="intro">
<div class="container">
<div class="row">
<div class="col-xs-4">
<img id="intro-pic" src="https://cdn.pixabay.com/photo/2017/03/27/11/29/cat-2178155_1280.jpg" alt="catpic"/>
</div>
<div class="col-xs-8">
<h5 class="intro-box">Front-End Developer and UX/UI designer with experience in instructional design and educational technology.</h5>
<h5 class="intro-box">Web Developer | UX Designer | Instructional Designer | Graphic Artist</h5>
</div>
</div>
</div>
</div>
</div>

Sorry, that came out a mess
Kevin
@kevinwr
Jun 13 2017 23:18
let me go look. I'll see if I can come up with anything
Eme
@Mezitek
Jun 13 2017 23:18
Thanks very much!
Zach Upshaw
@zlupshaw
Jun 13 2017 23:20
Hey guys! I think I'm finished with my first project (Tribute page). Could you check it out and give me some feedback?
Eme
@Mezitek
Jun 13 2017 23:22
@zlupshaw It looks great! The top image is a little stretched, but other than that it's got a nice clean feel. I like how you styled the background.
Kevin
@kevinwr
Jun 13 2017 23:26
@Mezitek I think part of the problem is using the incorrect version of bootstrap
I had this issue too
you loaded 4.0.0, and you need to load this: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
bootstrap 4.0.0 doesn't use the same class names as 3.3.7, and fCC uses the class names they use in 3.3.7
Eme
@Mezitek
Jun 13 2017 23:28
@FlawlessSardine aha, that makes sense. Goodness, I've been beating my brains out trying to figure out what was wrong. Thank you for taking a look!
CamperBot
@camperbot
Jun 13 2017 23:28
mezitek sends brownie points to @flawlesssardine :sparkles: :thumbsup: :sparkles:
:cookie: 220 | @flawlesssardine |http://www.freecodecamp.com/flawlesssardine
Eme
@Mezitek
Jun 13 2017 23:29
Worked like a charm.
Kevin
@kevinwr
Jun 13 2017 23:31
@Mezitek When you do that, some of the code/padding will have to be re-worked as will the navbar
Cole Maly
@malycole
Jun 13 2017 23:31
With regard to the Math.max() and Math.min() functions how do I pass an array into the function such that it reads the max of an array? I could always just sort the array and use it that way but I have to think there's a more elegant way
Kevin
@kevinwr
Jun 13 2017 23:31
but now the div's are correctly next to one another
Dan Couper
@DanCouper
Jun 13 2017 23:34
@malycole Math.max(...[1,2,3])
Kevin
@kevinwr
Jun 13 2017 23:35
@malycole and you need to re-arrange some of your div's, too.
Eme
@Mezitek
Jun 13 2017 23:35
@FlawlessSardine I see what you mean, I'll go through and rework those bits
Cole Maly
@malycole
Jun 13 2017 23:36
@DanCouper my issue with that is that the array is a variable. So say for example, when I try to pass Math.max(arr) (where arr is [1, 2]) it reads it as undefined. Is there a reason it wont accept that?
Kevin
@kevinwr
Jun 13 2017 23:36
@Mezitek I moved <div class="container"> before <div class="my-div"> and it helped make sure everything else was inside that container
Dan Couper
@DanCouper
Jun 13 2017 23:36
@malycole Math.max(...arr)
Kevin
@kevinwr
Jun 13 2017 23:36
Keep tweekin' and you'll get it :)
Richard Smith
@r1chard5mith
Jun 13 2017 23:37
@DanCouper don't you need 'apply'?
Dan Couper
@DanCouper
Jun 13 2017 23:38
... is the spread operator, it 'spreads' the values of the array into individual arguments
Richard Smith
@r1chard5mith
Jun 13 2017 23:38
@DanCouper ok, right - and then max takes any number of arguments?
@DanCouper got it. I like it. I'll do that from now on, much better than using apply. thanks!
CamperBot
@camperbot
Jun 13 2017 23:39
r1chard5mith sends brownie points to @dancouper :sparkles: :thumbsup: :sparkles:
:cookie: 768 | @dancouper |http://www.freecodecamp.com/dancouper
Dan Couper
@DanCouper
Jun 13 2017 23:40
Yeah, any number. The spread operator obseletes the use of apply in this case, but apply will work fine (Math.max.apply(null, arr)) if you need to support old browsers (IE11 for example)
James9446
@James9446
Jun 13 2017 23:40
Hello! Is it possible to expand the coding section of my window to full screen?
Richard Smith
@r1chard5mith
Jun 13 2017 23:43
@James9446 just zoom in? (command-+ on a mac)
Eme
@Mezitek
Jun 13 2017 23:43
@FlawlessSardine That's a good idea. It all looks so easy when you're working through the tutorials lol. Actually it's not too bad though. I appreciate your help.
James9446
@James9446
Jun 13 2017 23:44
Okay thanks @r1chard5mith
CamperBot
@camperbot
Jun 13 2017 23:44
james9446 sends brownie points to @r1chard5mith :sparkles: :thumbsup: :sparkles:
:warning: james9446 already gave r1chard5mith points
Kevin
@kevinwr
Jun 13 2017 23:48
@Mezitek You're welcome
James9446
@James9446
Jun 13 2017 23:49
For the challenge "Create Bootstrap Headline" should I be styling directly inside the element tag?
Such as <h3 class="text-primary text-center">jQuery Playground</h3>
Gulsvi
@gulsvi
Jun 13 2017 23:51
@James9446 Yes, that's the only way to add a class to an element in HTML.
James9446
@James9446
Jun 13 2017 23:51
I believe generally it's not best to style in the html as opposed to in a separate CSS file. Isn't that correct? Should I assume that will be covered later and this is simply getting me through fundamentals?
Gulsvi
@gulsvi
Jun 13 2017 23:52
@James9446 I think you may be confusing class="" with style=""
using a class is preferred compared to an inline style
James9446
@James9446
Jun 13 2017 23:52
Perhaps
In this case isn't is styling the text?
Gulsvi
@gulsvi
Jun 13 2017 23:52
class="text-center" < -- good
style="text-align: center" <-- not as good
James9446
@James9446
Jun 13 2017 23:53
and changing the text color?
Gulsvi
@gulsvi
Jun 13 2017 23:53
<myElement class="myClassThatChangesTheColor">myColoredText</myElement>
James9446
@James9446
Jun 13 2017 23:53
Isn't it best to avoid that in the html as opposed to in a separate css file?
Gulsvi
@gulsvi
Jun 13 2017 23:54
You reference class names in your HTML and define those classes in your separate css file
Kevin
@kevinwr
Jun 13 2017 23:54
CLASS is the link between your html file and css file
you define your class in the CSS file, then you link your html element to that class.
James9446
@James9446
Jun 13 2017 23:55
Okay thanks for helping me @SkyC0der , thats what I thought. It's so far in this tutorial that hasn't happened.
CamperBot
@camperbot
Jun 13 2017 23:55
james9446 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 1696 | @skyc0der |http://www.freecodecamp.com/skyc0der
James9446
@James9446
Jun 13 2017 23:55
When using Bootstrap am I pulling from predefined classes?
Gulsvi
@gulsvi
Jun 13 2017 23:56
yes, it's a CSS library
James9446
@James9446
Jun 13 2017 23:56
oh okay, so I don't need to define the class in that case but just need to reference it?
Gulsvi
@gulsvi
Jun 13 2017 23:56
For example, open this in your browser and search for "text-center" https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css
You'll see the CSS they use for that class name
Yeah, in a full app, you'll need to link that to library to your code and then just reference the class names - they'll get styled automagically
Dan Couper
@DanCouper
Jun 13 2017 23:57

@r1chard5mith ... is really useful, one of the best features added to JS in 2015, and you can use it in loads of places. It's used for two things: when used as the spread operator, it expands out an iterable into it's constituent elements, like in Math.max.

And it can also used with an argument to a function: rest parameters, as in "the rest of the arguments", for example:

function addUpNumbers(...nums) {
  let result = 0;
  for (const num of nums) {
    result += num;
  }
  return result;
}

nums is just any amount of numbers passed as arguments - you can then just iterate through them - inside the function nums will just be an array of numbers: addUpNums(1,2,3,4) will be 10.

I'd look at understanding them well (I think the FCC beta has a section on them) - you can do very clever stuff with them, and generally they make your code very concise and very often easy to understand (for example, you never really need to use arguments in functions, it is always explicit what is being passed in).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters

James9446
@James9446
Jun 13 2017 23:58
That clears it up for me Thank you @SkyC0der and thank you @FlawlessSardine
CamperBot
@camperbot
Jun 13 2017 23:58
james9446 sends brownie points to @skyc0der and @flawlesssardine :sparkles: :thumbsup: :sparkles:
:warning: james9446 already gave skyc0der points
:cookie: 221 | @flawlesssardine |http://www.freecodecamp.com/flawlesssardine