These are chat archives for FreeCodeCamp/HelpFrontEnd

18th
Oct 2017
Ben Hart
@Benjmhart
Oct 18 2017 00:46 UTC
hey folks, is there any reason you would get a typerror trying to get the length of an object as a condition on a while loop, but be able to get the length elsewhere? link here: https://pastebin.com/cQAV9cby
Danilo Geronimo
@danilogeronimo
Oct 18 2017 00:46 UTC
Hello! Can anybody help me to understand why clearInterval() isn't working?
function countdown(c){
var counting = setInterval(function(){
$('div h1').text(c); c--; count++; if(c===0 && !breaking){ c = nBreak; breaking = true; countdown(c); } if(breaking && c===0){ c = nCount; breaking = false; countdown(c); } if(count === 20){ clearInterval(counting); } }, 1000); } Adam Ayd @adamayd Oct 18 2017 00:48 UTC @danilogeronimo is clearinterval giving you an undefined error? Danilo Geronimo @danilogeronimo Oct 18 2017 00:51 UTC @adamayd yes, if i console.log clearinterval(counting) it returning undefined Adam Ayd @adamayd Oct 18 2017 00:54 UTC @danilogeronimo I believe its because you are clearing counting in the same statement as you are defining. I think it would work if you added var counting = 0; prior just taking a stab. I’m not in a position to actually test code right now. Danilo Geronimo @danilogeronimo Oct 18 2017 00:57 UTC @adamayd i tryied this (i'm not sure about this), but not worked :worried: if(count === 20){ var counting = 0; clearinterval(counting); } korzo @korzo Oct 18 2017 00:58 UTC @danilogeronimo clearInterval always returns undefined Danilo Geronimo @danilogeronimo Oct 18 2017 01:00 UTC Correct me if I'm wrong but i think the recursive function is the problem here, but i don't know why :( korzo @korzo Oct 18 2017 01:03 UTC @danilogeronimo I think problem is, that variable count is in global scope Because then you have more functions using the same global counter when count === 20, one interval is cleared, but next are running, because count is 21, 22 .... @danilogeronimo Danilo Geronimo @danilogeronimo Oct 18 2017 01:09 UTC @korzo i made global var counting = 0(outside of countdown()). Why it still not working? korzo @korzo Oct 18 2017 01:10 UTC @danilogeronimo counting is set by JS engine (ID of the interval). If it's global, it's overwritten with every countdown(c) and you cant clear it anymore Danilo Geronimo @danilogeronimo Oct 18 2017 01:17 UTC @korzo finally it works! Thanks for your time :smile: CamperBot @camperbot Oct 18 2017 01:17 UTC danilogeronimo sends brownie points to @korzo :sparkles: :thumbsup: :sparkles: :cookie: 635 | @korzo |http://www.freecodecamp.com/korzo Znadams @Znadams Oct 18 2017 01:27 UTC good morning/night campers! Lets get it! Roger Futrell @rogfut Oct 18 2017 04:49 UTC hello all, im seemingly stuck. when printing out an array to console, I can see it in my browser console but I am unable to access any index within the array. any help appreciated. Line 22: https://codepen.io/rogfut/pen/YxMBZr?editors=0010 Johnny @jtan3 Oct 18 2017 04:57 UTC @rogfut you're console.log(streamInfo) is an empty array . Roger Futrell @rogfut Oct 18 2017 04:58 UTC yeah I think i just realized that, its executing before the ajax Johnny @jtan3 Oct 18 2017 04:58 UTC @rogfut try console.log(data1) after your ajax Roger Futrell @rogfut Oct 18 2017 04:59 UTC so that leads me to a design question: it looks like an "easy" way to get what I want is to do async: false in the ajax, but what I really want to do is write my console log in such a way it executes after the ajax. ajax will populate an array which I can then use as I want. ill try it yes, it works. if my goal is to dynamically draw rows with data from the ajax, should I just draw the row in the success function of the ajax? Johnny @jtan3 Oct 18 2017 05:02 UTC @rogfut i think so. Roger Futrell @rogfut Oct 18 2017 05:02 UTC ok, thank you for your help johnny got it working, thanks again for taking the time to respond :) https://codepen.io/rogfut/pen/YxMBZr?editors=0010 Johnny @jtan3 Oct 18 2017 05:06 UTC @rogfut nice Spyrantis Theodoros @thodorisanta Oct 18 2017 07:02 UTC how can i call this $('.player1').css('visibility', 'visible'); with delay of 4 seconds?
GabriRa
@GabriRa
Oct 18 2017 09:07 UTC
Hey, Can someone help me with d3?
I need some help creating a domain of a scale with minutes
Or with timeScales in general
Sorin Ruse
@sorinr
Oct 18 2017 09:42 UTC
@thodorisanta using setTimeout function
Pascal Clanget
@Gh05d
Oct 18 2017 09:57 UTC

Hi guys, can anybody tell me how I can remove the dots inside my buttons, without the buttons losing their shape and just being flat?

https://codepen.io/Gh05d/pen/jGeRBG?editors=1100

korzo
@korzo
Oct 18 2017 10:07 UTC
@Gh05d give it color of background
Pascal Clanget
@Gh05d
Oct 18 2017 10:09 UTC
Tried that, but the buttons have this gradient color, so that did not work as expected
korzo
@korzo
Oct 18 2017 10:14 UTC
@Gh05d Problem is that your buttons rely on content for their dimensions.
You should set fixed dimensions on them and remove content.
Anyway, quick fix is to wrap dot with span and give this span opacity: 0 or visibility: hidden
Pascal Clanget
@Gh05d
Oct 18 2017 10:19 UTC
@korzo That totally worked :thumbsup: thx. I already created an invisibilty class, but set the color to white :smile:
CamperBot
@camperbot
Oct 18 2017 10:19 UTC
gh05d sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 637 | @korzo |http://www.freecodecamp.com/korzo
Pascal Clanget
@Gh05d
Oct 18 2017 10:24 UTC
@ashwins93 Sorry for the late reply, but your proposal with setting the line-height work. Thx bro :thumbsup:
CamperBot
@camperbot
Oct 18 2017 10:24 UTC
gh05d sends brownie points to @ashwins93 :sparkles: :thumbsup: :sparkles:
:cookie: 378 | @ashwins93 |http://www.freecodecamp.com/ashwins93
Pascal Clanget
@Gh05d
Oct 18 2017 10:29 UTC
@korzo When I click a button, there appears an ugly rectangle around it. Do you know how to remove it?
or better said prevent it from showing
korzo
@korzo
Oct 18 2017 10:30 UTC
@Gh05d outline: none
Pascal Clanget
@Gh05d
Oct 18 2017 10:32 UTC
@korzo thx :thumbsup:
CamperBot
@camperbot
Oct 18 2017 10:32 UTC
gh05d sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
api offline
Spyrantis Theodoros
@thodorisanta
Oct 18 2017 10:39 UTC

Can someone help me with the css, im really having trouble with aligning the 4 tags above my tic tac toe game.I realy dont know how to do it :/ i kinda suck at css. I'm talking about the

.player1 , .you {
padding: 20px;
margin: 85px 600px -140px 470px;
text-align: center;
background-color: green;
border-radius: 5px;
font-size: 17px;
}

.player2 , .computer{
padding: 20px;
margin: 85px 470px -137px 600px;
text-align: center;
background-color: yellow;
border-radius: 5px;
font-size: 17px;
}

I want them to be in the position that they are but to align them better according to the game box.

https://codepen.io/oshikurou/pen/zEyrqR?editors=1111

CoderG
@codergla
Oct 18 2017 11:12 UTC
hey guys, i am almost done with the jQuery part of fcc. So I am about to start my first project and I can't really stay online for long periods(on codepen). therefore, i was wondering if it would be alright to do the projects using sublime editor and then post the whole thing on codepen later , before submitting. any thoughts?
Ken Haduch
@khaduch
Oct 18 2017 11:20 UTC
@codergla - that's a good way to do it. One slight difficulty is that posting code on CodePen requires some small effort to post it properly. The way that codepen forms the output page is that it takes the external libs from the configuration settings, the HTML from the HTML panel, the CSS from the CSS panel, etc and "glues" it together using a template. To properly post the code on CodePen, you should apportion all of the code to the proper places so that you end up with a valid HTML output. But local development is fine, it makes it a little harder to get help if you want to ask for it... that's my opinion!
Ashwin
@ashwins93
Oct 18 2017 11:21 UTC
@thodorisanta wait i'm forking it, i will fix it in a moment

@thodorisanta https://codepen.io/ashwins93/pen/dVwqeL?editors=0100

there you go buddy

CoderG
@codergla
Oct 18 2017 11:26 UTC
@khaduch thank you for the quick and thoughtful reply! I acknowledge the difficulties that will probably will come with local development. hopefully, i will go through with the whole thing! Wish me luck!
CamperBot
@camperbot
Oct 18 2017 11:26 UTC
codergla sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3376 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Oct 18 2017 11:27 UTC
@codergla - good luck! And you're welcome... have fun coding!
CoderG
@codergla
Oct 18 2017 11:31 UTC
@khaduch :smile:
Pascal Clanget
@Gh05d
Oct 18 2017 12:34 UTC
Hi guys, I am having problems with Scss. My background color doesn't change anymore, it stays on grey. What did I do wrong?
@mixin big-buttons($color,$top, $right,$bottom, $left,$hover, $active) { //Normal Styling & { background:$color;
flex-basis: 50%;
padding: 0;
border-style: solid;
border-width: $top$right $bottom$left;
border-color: #0c0811;
cursor: pointer;
outline: none;
}
//Pseudo Selector Styling
&:hover {
background: $hover; } , &:active { background:$active;
}

&:disabled {
background: grey;
cursor: not-allowed;
}
}
npardon
@npardon
Oct 18 2017 12:57 UTC
Hi guys, I just finished my weather app. However, it is not showing the city. I don't know why. Here the link: https://codepen.io/npardon/full/ZXVqRP/. Maybe someone can tell me what I am doing wrong. Thanks
Adam Ayd
@adamayd
Oct 18 2017 12:58 UTC
@Gh05d why do you have a comma before your &:active line?
Adam Ayd
@adamayd
Oct 18 2017 13:09 UTC
@npardon You have an input and and a span both with the ID of city.
npardon
@npardon
Oct 18 2017 13:18 UTC
@adamayd thanks
CamperBot
@camperbot
Oct 18 2017 13:18 UTC
npardon sends brownie points to @adamayd :sparkles: :thumbsup: :sparkles:
:cookie: 298 | @adamayd |http://www.freecodecamp.com/adamayd
Pascal Clanget
@Gh05d
Oct 18 2017 13:18 UTC
@adamayd because I am stupid :man_with_gua_pi_mao: haha Thx, that fixed it
CamperBot
@camperbot
Oct 18 2017 13:18 UTC
gh05d sends brownie points to @adamayd :sparkles: :thumbsup: :sparkles:
:cookie: 299 | @adamayd |http://www.freecodecamp.com/adamayd
Spyrantis Theodoros
@thodorisanta
Oct 18 2017 13:24 UTC

@ashwins93 thanks but 1) the tags for the one player mode and the tags from the two player mode are in different positions while they should had matched. 2) i want them to be placed exactly at the top corners of the "game-box" whith the bottoms of the tags to be slightly hidden under the "game-box" like the tags in my project for the one player game-mode :

https://codepen.io/oshikurou/pen/zEyrqR?editors=1111

Ashwin
@ashwins93
Oct 18 2017 13:25 UTC
@thodorisanta I don't understand how you want it
okay i understood
change the the second div's position to relative
and adjust the top property till its hidden under the rug
GabriRa
@GabriRa
Oct 18 2017 13:49 UTC
Need some help with d3
How can append some text to a circle for example
I did it with a div and it doesn't display
Kaz Baig
@kbaig
Oct 18 2017 14:36 UTC
@GabriRa could you share the code?
@GabriRa You wouldn't be able to append to a circle, that's like doing
<circle>
<div></div>
</circle>
@GabriRa So if you're doing a text element, you could append it to svg using the same coordinates as your circle, or you could append a div to those same coordinates
GabriRa
@GabriRa
Oct 18 2017 15:59 UTC
Yeah,that's my new plan, get coordinates from the attributes and the use them to position a div
And another thing, could you explain me a little how time format works? I dont know what should I do to get min:secs from a scale
And thanks! @kbaig
CamperBot
@camperbot
Oct 18 2017 16:01 UTC
gabrira sends brownie points to @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 360 | @kbaig |http://www.freecodecamp.com/kbaig
GabriRa
@GabriRa
Oct 18 2017 16:14 UTC
Jose Diaz
@jsd540
Oct 18 2017 17:34 UTC
once the document is created by javascript can an element be removed or hidden without having to call the api again?
Juli Cheng
@julicheng
Oct 18 2017 17:58 UTC

hi can someone help me? i'm making my portfolio page and it looks fine until i resize my window and the bottom 2 sections run into each other

this is my site url https://julicheng.github.io/

Markus Kiili
@Masd925
Oct 18 2017 18:03 UTC
@jsd540 You can do that by manipulating the browser DOM with Javascript.
Brian
@Cornielle
Oct 18 2017 18:05 UTC
Hello World
someone has use jquery steps lib?
Jose Diaz
@jsd540
Oct 18 2017 18:20 UTC
@Masd925 Thanks!
CamperBot
@camperbot
Oct 18 2017 18:20 UTC
jsd540 sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4541 | @masd925 |http://www.freecodecamp.com/masd925
Marouane R
@mrassili
Oct 18 2017 18:33 UTC
@julicheng Great work btw! I love it
@julicheng How can I see your code ?
Juli Cheng
@julicheng
Oct 18 2017 18:59 UTC
@mrassili hi thanks! you can either see the code from right clicking my page and then clicking inspect or you can go on my github and all the code is there my github
CamperBot
@camperbot
Oct 18 2017 18:59 UTC
julicheng sends brownie points to @mrassili :sparkles: :thumbsup: :sparkles:
:cookie: 21 | @mrassili |http://www.freecodecamp.com/mrassili
Spyrantis Theodoros
@thodorisanta
Oct 18 2017 19:01 UTC

okay, i think its finished. Can you take a look at it and "rate it" 0-10 for UI , html, css and JS please?
i know i can make it better but at these point...meh :/
take a look and tell me what you think :)

https://codepen.io/oshikurou/full/zEyrqR/

Ashwin
@ashwins93
Oct 18 2017 19:17 UTC
@thodorisanta congrats
@Martialis39 Hey man idk if you remember me, but we pair programmed about a year ago :P
Martialis39
@Martialis39
Oct 18 2017 19:19 UTC
Hey all, I think you can see what kind of layout I am trying to achieve. THe problem is it breaks on smaller screens https://codepen.io/martialis39/pen/gGZVEa
@ashwins93 definitely!
i still have the pm window open here on my left : D
how have you been doing?
Ashwin
@ashwins93
Oct 18 2017 19:20 UTC
@Martialis39 i'm fine man. I took a year long break from FCC
Martialis39
@Martialis39
Oct 18 2017 19:20 UTC
Im basically the same, back at it now recently
even found some likeminded people in my area who I occasionally meet up with
Ashwin
@ashwins93
Oct 18 2017 19:20 UTC
haha i got through the FrontEnd though - last week

even found some likeminded people in my area who I occasionally meet up with

that is actually great

Martialis39
@Martialis39
Oct 18 2017 19:21 UTC
nice!
i managed to get through that as well
now working on backend, react
just kind of dabbling
Ashwin
@ashwins93
Oct 18 2017 19:21 UTC
@Martialis39 Same here man. That is a freakish coincidence
Martialis39
@Martialis39
Oct 18 2017 19:21 UTC
:D indeed
Ashwin
@ashwins93
Oct 18 2017 19:22 UTC
@Martialis39 ok regarding you lander breaking on small screens there is an idea
Martialis39
@Martialis39
Oct 18 2017 19:22 UTC
shoot!
Ashwin
@ashwins93
Oct 18 2017 19:22 UTC
make media queries and alter the font-size
Martialis39
@Martialis39
Oct 18 2017 19:22 UTC
good point!
Ashwin
@ashwins93
Oct 18 2017 19:22 UTC
first off change all font-sizes to measure in ems or rems
then add a font def for body
20 px for min-width > 768 px
16 px for min-width> 400px
Martialis39
@Martialis39
Oct 18 2017 19:23 UTC
do you know, when using media queries, is there a standard number of them that people usually go for? Like maybe three, phone, tablet, desktop?
Ashwin
@ashwins93
Oct 18 2017 19:23 UTC
adjust the width based on where it breakes
breaks*
@Martialis39 yeah there is
Martialis39
@Martialis39
Oct 18 2017 19:23 UTC
because i was reading on css tricks and
Ashwin
@ashwins93
Oct 18 2017 19:24 UTC
i used to remember those numbers i forgot
Martialis39
@Martialis39
Oct 18 2017 19:24 UTC
well the article recommended targeting every single devices separately
Ashwin
@ashwins93
Oct 18 2017 19:24 UTC
those numbers are available in bootstrap site
Martialis39
@Martialis39
Oct 18 2017 19:24 UTC
which seems a bit of an overkill
oh ok, ill have a look
also one more thing, do have some go-to css that you use
to make the site render nicely without any scrollbars?
i ran into some issue where I had a wrapper div in the body
Ashwin
@ashwins93
Oct 18 2017 19:25 UTC
<576px Extra small
≥576px Small
≥768px Medium
≥992px Large
≥1200px Extra large
Martialis39
@Martialis39
Oct 18 2017 19:25 UTC
body set to 100% height and width, wrapper div set to inherit that
but then the divs childrens position:relative wouldnt work
Ashwin
@ashwins93
Oct 18 2017 19:25 UTC
you can work with tabs
Martialis39
@Martialis39
Oct 18 2017 19:25 UTC
so i had to hack it and just pick a semi-random view height for the wrapper
@ashwins93 I have to go, but i would love to catch up. perhaps some other day. Good luck man!
Ashwin
@ashwins93
Oct 18 2017 19:32 UTC
Sure thing
Dušan Todorović
@krckyboy
Oct 18 2017 19:38 UTC
I'm thinking of moving to Linux, so I'm wondering if anyone could tell me if there's a benefit of using Linux instead of windows, for example, for a web developer?
Jessie Cryer
@j-cryer
Oct 18 2017 19:56 UTC
Does anyone know of an easy way to display a larger, floating image of an image on hover?
Juli Cheng
@julicheng
Oct 18 2017 20:01 UTC
anyone know how to turn menu into a hamburger menu when the user is on mobile? my page so far
Eric Hasegawa
@EricHasegawa
Oct 18 2017 20:04 UTC
I'm trying to fix this code so the text doesn't cause the image to fade in and out when hovered over
Can anyone help?
@krckyboy Linux is open source and is supposed to be very reliable
Lots of free software is built for linux I think
Linux is more secure than windows as well (in general)
quickspeedy
@quickspeedy
Oct 18 2017 20:11 UTC

I am trying to get the global variables to store the time but the values disappear.

var sunrise = "";
var sunset = "";

//assign sunrise and sunset time to its variable
function getSunTime(jsonObject) {
var sunriseHour = "";
var sunriseMin = "";
var sunsetHour = "";
var sunsetMin = "";

var json = JSON.parse(jsonObject.responseText);
sunriseHour = json.sun_phase.sunrise.hour;
sunriseMin = json.sun_phase.sunrise.minute;
sunsetHour = json.sun_phase.sunset.hour;
sunsetMin = json.sun_phase.sunset.minute;
sunrise = sunriseHour.concat(":", sunriseMin);
sunset = sunsetHour.concat(":", sunsetMin);
console.log("Sun: " + sunrise + " " + sunset);
}

//run and get sun time.
loadSunTime();

This is a brief code

See codepen for more: https://codepen.io/quickspeedy/pen/XeomjK

Values disappear when I tried to get the sunrise and sunset value in function displayWeather.
If you check in the console, you will see Filter sun time: blank
Adam Faraj
@adamfaraj
Oct 18 2017 20:37 UTC
is anyone good at CORS?
@quickspeedy i'm getting Sun: 7:13 18:09 in the console
quickspeedy
@quickspeedy
Oct 18 2017 20:40 UTC
@adamfaraj Yes and that is fine. But Filter sun time is blank. It's supposed to return 713 and 1809
without the colon.
Adam Faraj
@adamfaraj
Oct 18 2017 20:42 UTC
@quickspeedy console.log("Filter sun time: "
but you have a colon there?
i'm lost
your sunrise and sunset variables are out of scope
quickspeedy
@quickspeedy
Oct 18 2017 20:43 UTC
Wouldn't sunrise and sunset variables be global scope?
console.log("Filter sun time: ") is supposed to return sun time without the colon.
So it's supposed to look like this Filter sun time: 713 1809
Sun: 7:13 18:09 works but with colon
Adam Faraj
@adamfaraj
Oct 18 2017 20:46 UTC
@quickspeedy it looks like you defined the sunset and sunset variable inside the getSunTime() function
but globally, they're still ""
i think, idk
quickspeedy
@quickspeedy
Oct 18 2017 20:48 UTC
But I didn't use var sunset or var sunrise inside the getSunTime() function. Which is why I didn't use var in the getSunTime().
How would I assign it globally?
in the getSunTime() function.
Moisés Man
@moigithub
Oct 18 2017 20:49 UTC
what filterTime function does ??
quickspeedy
@quickspeedy
Oct 18 2017 20:51 UTC
@moigithub It removes colon from the timestamp and if the api return time such as 103 (supposed to be 10:03am) where 10 is hour and 3 is minute.
Moisés Man
@moigithub
Oct 18 2017 20:52 UTC
soo u add colon var currentTime = filterTime(hour.concat(":", min));
to remove it after ??

why not just

  var hour = myDate.getHours().toString();
var min = myDate.getMinutes().toString();

var currentTime = hour + min;

quickspeedy
@quickspeedy
Oct 18 2017 20:54 UTC
that was for testing purpose. I needed the sunrise and sunset variable to work.
If you look in the console, you'll see that Sun: 7:13 18:09 works fine in loadSunTime() function, but Filter sun time: appeared blank in displayWeather() function.
it has something to do with sunrise and sunset variable. I am trying to set them as global variables.
Adam Faraj
@adamfaraj
Oct 18 2017 20:57 UTC
@quickspeedy
function getSunTime(jsonObject) {
var json = JSON.parse(jsonObject.responseText);
sunriseHour = json.sun_phase.sunrise.hour;
sunriseMin = json.sun_phase.sunrise.minute;
sunsetHour = json.sun_phase.sunset.hour;
sunsetMin = json.sun_phase.sunset.minute;
sunrise = sunriseHour.concat(":", sunriseMin);
sunset = sunsetHour.concat(":", sunsetMin);
console.log("Sun: " + sunrise + " " + sunset);
console.log("Filter sun time: " + sunrise + " " + sunset);
}
why not do that?
quickspeedy
@quickspeedy
Oct 18 2017 20:58 UTC
  console.log("Sun: " + sunrise + " " + sunset);
console.log("Filter sun time: " + sunrise + " " + sunset);
They both result the same. I am trying to pass sunrise and sunset to displayWeather() function.
getSunTime() function works for sunrise and sunset variable, however in displayWeather() function, sunrise and sunset variable appear blank.
Cale Switzer
@Tennyx
Oct 18 2017 21:10 UTC
anyone here with knowledge of propagation as it pertains to changing where a domain name points?
Adam Faraj
@adamfaraj
Oct 18 2017 21:12 UTC
@quickspeedy i dont think displayWeather() will have access to those variables
they're defined globally as "", but defined within the getSunTime()
amare16
@amare16
Oct 18 2017 21:13 UTC
Anyone help me to build signup form with javascript and jquery... the trick is when someone register, the name and his email going to the table list with order... no use of database?
quickspeedy
@quickspeedy
Oct 18 2017 21:14 UTC
How could I get those variables to work in displayWeather()?
Adam Faraj
@adamfaraj
Oct 18 2017 21:14 UTC
@quickspeedy move everything from displayWeather() to getSunTime() lol. dog, i have no clue
quickspeedy
@quickspeedy
Oct 18 2017 21:14 UTC
Would I need to use set and get function?
Adam Faraj
@adamfaraj
Oct 18 2017 21:14 UTC
probably
quickspeedy
@quickspeedy
Oct 18 2017 21:14 UTC
Ok.
Moisés Man
@moigithub
Oct 18 2017 21:15 UTC
displayWeather execute -> console.log("In function displayWeather: " + sunrise + " " + sunset);
but sunrise and sunset are "filled" in loadSuntime which IS ASYNCHRONOUS (soo it take time to load data)
but u treat those statements as Synchronous
 loadSunTime();  // <-- this fills sunrise and sunset LATER at some point
displayWeather(mainWeather, desc, temperature, city, dt); // when console log happen here.. those variables arent populated yet
u could use promises....
quickspeedy
@quickspeedy
Oct 18 2017 21:16 UTC
Ok I'll look up promises since I never heard of it.
amare16
@amare16
Oct 18 2017 21:19 UTC
Anyone help me to build signup form with javascript and jquery... the trick is when someone register, the name and his email going to the table list with order... no use of database?
Adam Faraj
@adamfaraj
Oct 18 2017 21:23 UTC
@amare16 is this production code?
Kaz Baig
@kbaig
Oct 18 2017 22:13 UTC
@GabriRa sorry for the late reply but you want to take a look at d3 time scale. Let me know if you have questions, I only made it past those first couple of d3 challenges a couple weeks ago
Jaquavieon
@Jaquavieon
Oct 18 2017 23:53 UTC
nvm