These are chat archives for FreeCodeCamp/HelpFrontEnd

10th
Oct 2017
Allan Oloo
@OlooAllaN
Oct 10 2017 00:50
https://codepen.io/OA11an/full/XeejzO/
When I am in iphone 5 or mobile responsiveness. I have weird dead pixels on my modal backdrop any ideas why this is happening?
StrategyIsKey23
@23beyblade
Oct 10 2017 01:22
Does anyone here know why jQuery will make only target 2 and 5 bounce, if i selected the nth-child of 2. Shouldnt it have selected 2, 4, and 6? every other one right? or is this occurring because the target classes are in 2 different div tags? Im not sure, it would rock if someone could help me with this. Thanks.
Does anyone here know why jQuery will make only target 2 and and 5 bounce, if i selected
sorry didnt mean to comment that last one^
sorry
<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target1").prop("disabled", true);
    $("#target4").remove();
    $("#target2").appendTo("#right-well");
    $("#target5").clone().appendTo("#left-well");
    $("#target1").parent().css("background-color", "red");
    $("#right-well").children().css("color", "orange");
    $(".target:nth-child(2)").addClass("animated bounce")

  });
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>
Lean Junio
@leanjunio
Oct 10 2017 01:32
$(".target:nth-child(2)").addClass("animated bounce”) targets everything that has a class name of target
ohh wait i just saw it haha
i think what you wanted was $(".target:even)").addClass("animated bounce”) to target every other 2nd element
Ruchika Sharma
@ruchika90
Oct 10 2017 01:40
@Manish-Giri ty i passed the challenge
CamperBot
@camperbot
Oct 10 2017 01:40
ruchika90 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6637 | @manish-giri |http://www.freecodecamp.com/manish-giri
alteducation
@alteducation
Oct 10 2017 01:50
@piteto thanks :+1:
CamperBot
@camperbot
Oct 10 2017 01:50
alteducation sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 229 | @piteto |http://www.freecodecamp.com/piteto
Lean Junio
@leanjunio
Oct 10 2017 02:05

React
Vue
Angular

and why? :)

Long Nguyen
@longnt80
Oct 10 2017 02:05
@leanjunio ?
Lean Junio
@leanjunio
Oct 10 2017 02:06
@longnt80 just wondering what people prefer working with
Long Nguyen
@longnt80
Oct 10 2017 02:08
I chose react because it is trending right now, good for job oppotunities
I haven't used angular or vue to comment about technical details
but I heard Vue is easy and flexible
Kaz Baig
@kbaig
Oct 10 2017 02:35
I tried Angular before React and felt that, compared to React, the learning curve is pretty high
brndnrz
@brndnrz
Oct 10 2017 02:42
why does assigning a conditional to a variable like let message; then rendering using React work? Why don't I have to use let message = conditional; then use ReactDOM.render({message}, etc)?
Kaz Baig
@kbaig
Oct 10 2017 03:14
@brndnrz React auto rerenders components when their props update
Kent Saeteurn
@sansae
Oct 10 2017 03:59
hello,
i'm working on the twitch app project.
does anyone know why my images will show in firefox, but not in chrome?
here is my pen: https://codepen.io/anon/pen/wrjgdP
TIA
i read that it might have something to do with an ad blocker on chrome, but i've checked all extensions in chrome, and have not found any ad block extensions. to be sure, i disabled all extensions and then refreshed the my web app, but nothing. any help would be greatly appreciated
piteto
@piteto
Oct 10 2017 04:06
@sansae img in your code is an object and .html() will replace the HTML between two tags - it can't be used with void elements like <img>
You'll want to do: $("#logo" + index).attr('src', logo);
update the src attribute of your <img> tags
ADIL KARMOUZI
@mradil16
Oct 10 2017 10:25

Guys I just found this amazing blog it collects the headlines of the latest stories from the best sites and blogs that cover web dev and web design topics : https://alldevtop.blogspot.com

Enjoy

MomchilDeus
@MomchilDeus
Oct 10 2017 13:01
Hey guys, I just scrambled together this tribute project https://codepen.io/MomchilDeus/project/editor/ZKwRjo . Feedback would be great :P
Ken Haduch
@khaduch
Oct 10 2017 13:08
@MomchilDeus - one bit of advice - in CodePen, you should not make a "Project", but just a "Pen". If you have a free account, you can only make one project. Pens can be more than one. For the tribute project, a pen should be enough.
The project looks nice, but the "Timeline" is not showing up well in the browser? It looks like everything is one mash of data? It seems that some resources were not loaded? timeline.css being one of them? Also 'hammer.js' - maybe you had a problem uploading? Looks like it is on a good track, though, so far!
@MomchilDeus - oh, and now I think I see why you selected a "Project" in CodePen, so you can have external resources. That might be an issue for you in the long run, unless you get a CodePen PRO account.
Kaz Baig
@kbaig
Oct 10 2017 13:14
@MomchilDeus Other than the above tip, I'd just add that increasing the contrast between background and text in the footer would be good
MomchilDeus
@MomchilDeus
Oct 10 2017 13:15
awesome, thanks guys :)
Kaz Baig
@kbaig
Oct 10 2017 13:16
Ah and might look better to remove border radius on footer as well @MomchilDeus
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:19
hi
i am stuck on a project
MomchilDeus
@MomchilDeus
Oct 10 2017 13:19
right, I've fixed the timeline on my end and removed the border-radius, I'll convert it to a pen next. Is hammerjs even needed on a pen? @kbaig @khaduch
hey dude
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:20
can somebody help me
Lean Junio
@leanjunio
Oct 10 2017 13:20
what’s up
Kaz Baig
@kbaig
Oct 10 2017 13:20
@MomchilDeus What are you using it for?
MomchilDeus
@MomchilDeus
Oct 10 2017 13:21
@kbaig swiping for the timeline on mobile
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:21
what is prepened used for
in jquery
The prepend() method inserts specified content at the beginning of the selected elements.
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:22
and how do you read documentation about any programming l;anguage
Kaz Baig
@kbaig
Oct 10 2017 13:22
@MomchilDeus As far as I know, there isn't something like that built into pens
Lean Junio
@leanjunio
Oct 10 2017 13:22
what do you mean? :/
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:22
i mean easily
Ken Haduch
@khaduch
Oct 10 2017 13:23
@khorramk - look for jQuery docs at https://api.jquery.com if that's what you're looking for
And if you have trouble reading the docs, you might want to start with some other lessons that go through explanations more thoroughly. There are some good things on http://w3schools.com that take you through things more slowly and explain well.
Lean Junio
@leanjunio
Oct 10 2017 13:23
I’m afraid there’s no easy way to “read” a documentation for a programming language.
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:23
o
Lean Junio
@leanjunio
Oct 10 2017 13:23
If you’re looking for guidelines in how to use a programming language, you might want to take a look at tutorial videos instead.
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:23
i know that
MomchilDeus
@MomchilDeus
Oct 10 2017 13:23
@khorramk I'd say practice, which programming language's documentation do you find difficult to read?
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:24
reading documentation is kind of duanting
jquery
javscript is easy to read
Kaz Baig
@kbaig
Oct 10 2017 13:24
It is at first, it gets better with practice!
Lean Junio
@leanjunio
Oct 10 2017 13:24
the jquery documentation is indeed daunting, try the w3schools site
Ken Haduch
@khaduch
Oct 10 2017 13:25
@khorramk - https://www.w3schools.com/jquery/default.asp is what I was trying to add to my post - it takes you through things more slowly to start with and gets you up to speed? I don't know if that's what you're looking for...
khorram bin salim khondkar
@khorramk
Oct 10 2017 13:25
thanks @leanjunio
CamperBot
@camperbot
Oct 10 2017 13:25
khorramk sends brownie points to @leanjunio :sparkles: :thumbsup: :sparkles:
:cookie: 290 | @leanjunio |http://www.freecodecamp.com/leanjunio
Ken Haduch
@khaduch
Oct 10 2017 13:29
@MomchilDeus - ah - nice work on the timeline! I haven't seen anyone use that in a tribute project. One thing that I found a bit evasive is the navigation element that you put in there. It wasn't obvious to me that you had other sections there until I accidentally hovered over that button... But that is really a great tribute page - nice setup and responsive behavior is great!
MomchilDeus
@MomchilDeus
Oct 10 2017 13:37
@khaduch Thanks! I'll see what I can do about the navigation
CamperBot
@camperbot
Oct 10 2017 13:37
momchildeus sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3356 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Oct 10 2017 13:39
@MomchilDeus - - that would be good - just some way to make it more obvious that there was more there? It wasn't obvious to me, but maybe that was just me? Nice work on the page!
MomchilDeus
@MomchilDeus
Oct 10 2017 13:51
@khaduch I added "More" and an arrow pointing up below it, hope that's enough!
Ken Haduch
@khaduch
Oct 10 2017 15:09
@MomchilDeus - did you post a new link? I reloaded the page and don't see that new addition? I was thinking that maybe the (what seems like more standard) "hamburger" icon would be effective, too? I'd like to see what you added but it doesn't seem to be on the project link that I'm loading?
Michael Cordero
@CyberPutty
Oct 10 2017 15:26
@khorramk just woke up I found the jquery stuff a little hard to understand too, especially working on the ajax stuff. I read jon ducket's book javascript and jquery and I still use that for reference when i forget something
quickspeedy
@quickspeedy
Oct 10 2017 15:37
Question about the weather project, after reviewing the data from ajax, is dt consider a time? If so, what does it stand for? I am trying to locate the timestamp.
Here is a sample of the data
"{"coord":{"lon":-97.96,"lat":29.57},"weather":[{"id":804,"main":"Clouds","description":"overcast clouds","icon":"https://cdn.glitch.com/6e8889e5-7a72-48f0-a061-863548450de5%2F04d.png?1499366020964"}],"base":"stations","main":{"temp":18.02,"pressure":1021,"humidity":55,"temp_min":17,"temp_max":19},"visibility":16093,"wind":{"speed":10.8,"deg":10,"gust":14.4},"clouds":{"all":90},"dt":1507647780,"sys":{"type":1,"id":2687,"message":0.004,"country":"US","sunrise":1507638653,"sunset":1507680346},"id":4727756,"name":"Seguin","cod":200}"
mstellaluna
@mstellaluna
Oct 10 2017 15:49
@quickspeedy dt is epoch time ...
image.png
quickspeedy
@quickspeedy
Oct 10 2017 15:49
@mstellaluna thank you! Just what I need to know!
CamperBot
@camperbot
Oct 10 2017 15:49
quickspeedy sends brownie points to @mstellaluna :sparkles: :thumbsup: :sparkles:
:cookie: 895 | @mstellaluna |http://www.freecodecamp.com/mstellaluna
quickspeedy
@quickspeedy
Oct 10 2017 16:00
What's the common practice for placing onclick event? For example, do you place onclick event in the document.ready function or ...?
or do you place it in the onload function?
J.Chechelski
@SupaSaiyan
Oct 10 2017 16:02
It's worth to learn jQuery in 2017 before looking for a first job when somebody know ES5,ES6 and API DOM well?
Trommelochse
@Trommelochse
Oct 10 2017 16:24
@SupaSaiyan It can never be bad to know a language, especially one that is as wide-spread as jQuery. Learning the basics doesn't take long if you already have a solid understanding of Javascript and you will - at least in some way - profit from it; be it just increasing the love for modern frameworks ;)
I would not use jQuery for any personal project, but was forced to write some at work recently, since I have limited access to the environment I am working in, and jQuery was the only library available.
So, doing some DOM manipulation with jQuery for a week or two will definitely not hurt.
khorram bin salim khondkar
@khorramk
Oct 10 2017 16:30
what is wrong with this function?

```function showUser(xmlhttp){
if(xmlhttp.status === 200){
var json = xmlhttp.responseText;
var user = JSON.parse(json);
for(var key in user){
if(user[key] === 'id'){
$('#profile h2').prepend('<user login>' + ' is GitHub user #' + '<user id>'
);
}

  }

}else{
$('#profile h2').prepend('No such user!')
}

//

}```

J.Chechelski
@SupaSaiyan
Oct 10 2017 16:31
@Trommelochse thanks :D I will do that
CamperBot
@camperbot
Oct 10 2017 16:31
supasaiyan sends brownie points to @trommelochse :sparkles: :thumbsup: :sparkles:
:cookie: 334 | @trommelochse |http://www.freecodecamp.com/trommelochse
Trommelochse
@Trommelochse
Oct 10 2017 16:33
@khorramk you should format your code, it's readable
enclose it in 3 backtips on each side
so
Moisés Man
@moigithub
Oct 10 2017 16:34
@khorramk 3 backticks must be on its own line
Trommelochse
@Trommelochse
Oct 10 2017 16:34
ohyes, didn't see that he used some
and you should also start with ```js
so your code will be highlighted nicely
khorram bin salim khondkar
@khorramk
Oct 10 2017 16:36
function showUser(xmlhttp){
  if(xmlhttp.status === 200){
    var json = xmlhttp.responseText;
    var user = JSON.parse(json);
    for(var key in user){
      if(user[key] === 'id'){
        $('#profile h2').prepend('<user login>' + ' is GitHub user #' + '<user id>'
);
      }

      }
  }else{
      $('#profile h2').prepend('No such user!')
    }

  //


}
Moisés Man
@moigithub
Oct 10 2017 16:37
add some console.log to check ur data
also... on ur first prepend...
u can use a single string instead concatenate 3 strings
ie: 'user login is girhub user user id'
UNLESS.... <user login> and <user id > data comes from ur json , then thats should be variables instead
Michael Cordero
@CyberPutty
Oct 10 2017 16:43
don't you need to make a new XMLHttpRequest() Object and make your function a child of that.
or a property
khorram bin salim khondkar
@khorramk
Oct 10 2017 16:43
yes i already done that @CyberPutty
Michael Cordero
@CyberPutty
Oct 10 2017 16:55
@khorramk your missing a semicolon on your second declaration. but other than that i don't really know unless your key that is declared outside your function is not meshing with the id, haven't really used xml for web yet
Kaz Baig
@kbaig
Oct 10 2017 17:04
Marc
@MWBauer
Oct 10 2017 17:17
Could I get a new set of eyeballs to look at this and tell me why Nav isn't working right?
Michael Cordero
@CyberPutty
Oct 10 2017 17:32
@MWBauer use #id selector the navbar has dead links.
           <a href="#Experience">Experience</a>
           <a href="#Hobbies">Hobbies</a>
           <a href="#Projects">Projects</a>
Michael Cordero
@CyberPutty
Oct 10 2017 17:38
@MWBauer is that what you mean by not working right?
Marc
@MWBauer
Oct 10 2017 18:02
thanks @CyberPutty
CamperBot
@camperbot
Oct 10 2017 18:02
mwbauer sends brownie points to @cyberputty :sparkles: :thumbsup: :sparkles:
:cookie: 294 | @cyberputty |http://www.freecodecamp.com/cyberputty
Marc
@MWBauer
Oct 10 2017 18:02
that's awesome. That was all it was.
@CyberPutty Do you think I need to label the NavBar?
piteto
@piteto
Oct 10 2017 18:20
@MWBauer Update to the latest bootstrap 4 and try out the standard navbar:
<nav class="navbar fixed-top navbar-expand-sm navbar-dark bg-dark">
  <a class="navbar-brand" href="#experience">Marc W. Bauer</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav">
      <li class="nav-item active">
        <a class="nav-link" href="#experience">Experience</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#hobbies">Hobbies</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="#projects">Projects</a>
      </li>
    </ul>
  </div>
</nav>
That way you get a responsive navbar that works on mobile
Make sure your javascript includes jquery before bootstrap.js
Ken Haduch
@khaduch
Oct 10 2017 18:23
@kbaig - that d3 project looks good! Any chance of putting a conversion from Celsius to Fahrenheit? Should you cite the source of the data that you are using?
Kaz Baig
@kbaig
Oct 10 2017 18:26
@khaduch I guess I could add the functionality for fun. The dataset is from the D3 Heat Map challenge so I don't know what the source is
Ken Haduch
@khaduch
Oct 10 2017 18:28
@kbaig - oh, okay - I guess if they don't tell you then there's no way you could cite it... thanks!
CamperBot
@camperbot
Oct 10 2017 18:28
khaduch sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 347 | @kbaig |http://www.freecodecamp.com/kbaig
Kaz Baig
@kbaig
Oct 10 2017 18:28
@khaduch Thanks for taking a look :)
Ivan Ngundela
@ingundela
Oct 10 2017 18:43
hello everyone, please need some help with my project....I have added carousel image from bootstrap and also using smooth scrolling..... everytime I manually click prev or next arrow it show the next image but the website also move up and I don't understand what is going on here.... the site is: https://ingundela.github.io/imsaqa/
PLEASE HELP
Ian Gracia
@iangracia
Oct 10 2017 18:43

"Given two sets (for example set A = {1, 2, 3} and set B = {2, 3, 4}), the mathematical term "symmetric difference" of two sets is the set of elements which are in either of the two sets, but not in both (A △ B = C = {1, 4})." "

Example : "sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]) should return [1, 4, 5]"

Why should the 5 be in the returned array? If it is in all the 3 arrays, then its not a symmetric difference?

Trommelochse
@Trommelochse
Oct 10 2017 18:44
@ingundela working fine for me
Kaz Baig
@kbaig
Oct 10 2017 18:45
@iangracia Take the diff of the first two and then take the difference of that and the third
CamperBot
@camperbot
Oct 10 2017 18:45
kbaig sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 363 | @iangracia |http://www.freecodecamp.com/iangracia
Ivan Ngundela
@ingundela
Oct 10 2017 18:45
@Trommelochse sorry, I've removed the smooth scrolling on this one tho share with the client... allow me to add and you will se it moving up
Ian Gracia
@iangracia
Oct 10 2017 18:46
@kbaig thanks
CamperBot
@camperbot
Oct 10 2017 18:46
iangracia sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 348 | @kbaig |http://www.freecodecamp.com/kbaig
Ivan Ngundela
@ingundela
Oct 10 2017 18:53
@Trommelochse all the website a have with bootstrap carousel and smooth scrolling as the same issue and I don't know how to fix it have a look at this one aswell https://ingundela.github.io/tki/
Ian Gracia
@iangracia
Oct 10 2017 18:53

https://codepen.io/iangracia/pen/ZXoYRp

can someone tell me why my calc's toPrecision function works with the equation 0.1 + 0.2 = 0.3 but not with 0.3 + 0.6 = 0.8999999999999999

Ian Gracia
@iangracia
Oct 10 2017 19:01
pls someone help me im going crazy
piteto
@piteto
Oct 10 2017 19:02
@iangracia I don't know the answer to your question, but you should be adding an argument to .toPrecision() and converting the result to a number
CamperBot
@camperbot
Oct 10 2017 19:02
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
:cookie: 364 | @iangracia |http://www.freecodecamp.com/iangracia
piteto
@piteto
Oct 10 2017 19:02
Number(holder1.toPrecision(12));
.toPrecision() without an argument is the same as .toString()
If the precision argument is omitted, behaves as Number.prototype.toString(). If the precision argument is a non-integer value, it is rounded to the nearest integer.
Ivan Ngundela
@ingundela
Oct 10 2017 19:03
ANY HELP PLEASE: hello everyone, please need some help with my project....I have added carousel image from bootstrap and also using smooth scrolling..... everytime I manually click prev or next arrow it show the next image but the website also move up and I don't understand what is going on here.... the site is:https://ingundela.github.io/tki/
piteto
@piteto
Oct 10 2017 19:04
@ingundela It works fine for me, please don't shout
Ian Gracia
@iangracia
Oct 10 2017 19:05
var x = 3.0599999999999996;

console.log(Number(x.toPrecision(1));  //  3
console.log(Number(x.toPrecision(2));  // 3.1
console.log(Number(x.toPrecision(3));  // 3.06
console.log(Number(x.toPrecision(4));  // 3.06
console.log(Number(x.toPrecision(7));  // 3.06
console.log(Number(x.toPrecision());  // 3.06
@piteto this number can be put without any arg in the function and still returns a shortend number
Ivan Ngundela
@ingundela
Oct 10 2017 19:05
@piteto Thanks... when you click the prev or next arrow it don't move up?
CamperBot
@camperbot
Oct 10 2017 19:05
ingundela sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 231 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Oct 10 2017 19:06
@iangracia This is what I get:
console.log(Number(x.toPrecision(1)));  //  3
console.log(Number(x.toPrecision(2)));  // 3.1
console.log(Number(x.toPrecision(3)));  // 3.06
console.log(Number(x.toPrecision(4)));  // 3.06
console.log(Number(x.toPrecision(7)));  // 3.06
console.log(Number(x.toPrecision()));  // 3.059999999999996
CamperBot
@camperbot
Oct 10 2017 19:06
piteto sends brownie points to @iangracia :sparkles: :thumbsup: :sparkles:
api offline
Ivan Ngundela
@ingundela
Oct 10 2017 19:30
@piteto Sorted... Thanks
CamperBot
@camperbot
Oct 10 2017 19:30
api offline
ingundela sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
intcreate
@intcreate
Oct 10 2017 20:07
can any1 make the slider effect look better?
https://codepen.io/anon/pen/LzmaaN
quickspeedy
@quickspeedy
Oct 10 2017 20:56

How do you properly use for in loop through all the complex object?

I am stuck with this code:

  for(var key in weatherAdvices) {
    // console.log(key);
    if(key == "chilly") {
      for(var weatherCondition in key)
      console.log(key[0]);
    }
  }

My complex object:

  var weatherAdvices = {
     "chilly" : [
        {
          "Sunny" : "It's a beautiful day! Be sure to bring thick jacket!"
        },
        {
          "Cloudy" : "Don't let the weather get you down! Put a smile on your face and conquer the day!"
        },
        {
          "Rain" : "It's raining, be sure to bring an umbrella!"
        }
      ],
      "warm" : [
        {
          "Sunny" : "Ahh... So warm... Get out and enjoy the day!"
        },
        {
          "Cloudy" : "Don't let the weather get you down! Put a smile on your face and conquer the day!"
        },
        {
          "Rain" : "It's raining, be sure to bring an umbrella!"
        }
      ],
      "hot" : [
        {
          "Sunny" : "So hot! Be sure to use sunscreen lotion!"
        },
        {
          "Cloudy" : "Even though there is no sun, be sure to use sunscreen lotion!"
        },
        {
          "Rain" : "It's raining, be sure to bring an umbrella!"
        }
      ]
  }
The first if statement works and I decided to use another for in loop within that if statement but it doesn't work.
Any help would be appreciated!
piteto
@piteto
Oct 10 2017 21:02
@quickspeedy
for(var key in weatherAdvices) {
  if (key == "chilly") {
    console.log(weatherAdvices[key][0])
  }
}
quickspeedy
@quickspeedy
Oct 10 2017 21:07
Thanks. Didn't think of that. @piteto
CamperBot
@camperbot
Oct 10 2017 21:07
quickspeedy sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 232 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Oct 10 2017 21:07
no problem!
piteto
@piteto
Oct 10 2017 22:21
@intcreate You could move some of your HTML to your javascript to give more flexibility in adding more images. Something like: https://s.codepen.io/anon/pen/LzrENb?editors=0010
intcreate
@intcreate
Oct 10 2017 23:28
cool