These are chat archives for FreeCodeCamp/Help

19th
Jul 2017
just1witness
@just1witness
Jul 19 2017 00:40

I think I have an issue with the initial function, but I've given myself a headache trying to see it.

$(document).ready(function(){
function checkForcast(){
document.getElementById(text).value;
var current = checkForcast;

if (current == "Rain || Rainy"){

$('#image').removeClass('cloudy').addClass('rain');
}

  if (current == "Snow || Snowy"){

$('#image').removeClass('cloudy').addClass('snow');
}

if (current == "Sun || Sunny"){

$('#image').removeClass('cloudy').addClass('sunny');
}

 if (current == "Mostly"){  $('#image').removeClass('cloudy').addClass('partly');  
 }
} 

});
});
});

text is a variable by the way, it's value is the forcast. (like partly cloudy ext...)
just1witness
@just1witness
Jul 19 2017 00:46
also, I don't know why it looks so funky on here, I just copied and pasted the code
Raj Patel
@rajp1847
Jul 19 2017 00:52
need help
Kristi Nushi
@Kristi92
Jul 19 2017 00:52
@sjames1958gm can you help me please ?
Raj Patel
@rajp1847
Jul 19 2017 00:53
sure
Kristi Nushi
@Kristi92
Jul 19 2017 00:53
i have an issue on getgear and setgear?
Raj Patel
@rajp1847
Jul 19 2017 00:53
Okayyyyy
so with what
???
Stephen James
@sjames1958gm
Jul 19 2017 00:54
@Kristi92 Show your code
@just1witness https://forum.freecodecamp.com/t/markdown-code-formatting/18391
this link shows how to format code for gitter
Raj Patel
@rajp1847
Jul 19 2017 00:55
we know
Stephen James
@sjames1958gm
Jul 19 2017 00:56
@just1witness var current = checkForcast; this seems odd - you are assigning current to the name of the function?
Also your comparisons should probably be like current == "Rain" || current == "Rainy"
Clarice
@NinjaPlease84
Jul 19 2017 00:56
is that Zatoichi?
Raj Patel
@rajp1847
Jul 19 2017 00:57
need help
which one is Zatoichi
Uriel Guzmán
@Burinson
Jul 19 2017 00:58
How do I turn ["Hello", "hey"] into a string, "Hello", "hey"
Raj Patel
@rajp1847
Jul 19 2017 00:58
@Burinson how do you make a multi level dropdown menu
Uriel Guzmán
@Burinson
Jul 19 2017 00:59
A... navbar?
Raj Patel
@rajp1847
Jul 19 2017 01:00
how
korzo
@korzo
Jul 19 2017 01:00
@Burinson ["Hello", "hey"].join(', ')
Raj Patel
@rajp1847
Jul 19 2017 01:00
@korzo how do you make a multi level dropdown menu
Uriel Guzmán
@Burinson
Jul 19 2017 01:01
With an unordered list, it's one way
Raj Patel
@rajp1847
Jul 19 2017 01:01

yes like this `

<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">NavBar</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/fontenele/bootstrap-navbar-dropdowns" target="_blank">GitHub Project</a></li>
</ul>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Menu 1 <b class="caret"></b></a>
<ul class="dropdown-menu multi-level">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Menu 2 <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">A`

CSS is

`.dropdown-submenu {
position: relative;
}

.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px;
border-radius: 0 6px 6px 6px;
}

.dropdown-submenu:hover>.dropdown-menu {
display: block;
}

.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #ccc;
margin-top: 5px;
margin-right: -10px;
}

.dropdown-submenu:hover>a:after {
border-left-color: #fff;
}

.dropdown-submenu.pull-left {
float: none;
}

.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}`

Uriel Guzmán
@Burinson
Jul 19 2017 01:03
@korzo doesn't work :(
Clarice
@NinjaPlease84
Jul 19 2017 01:03

Stuck on Increment a Number with JavaScript..
what is shown above the line:
var myVar = 87;

what it required is:
myVar should equal 88
myVar = myVar should be changed
Use the ++ operator
Do not change code above the line

what I've tried:
var myVar = 87;

// Only change code below this line
myVar = 88;

var myVar = 87;
// Only change code below this line
myVar = 88;
myVar = myVar++;
I've tried the only few combos I can think of to pass this part but I can't figure it out.

Uriel Guzmán
@Burinson
Jul 19 2017 01:04
I want it to return the string, not the array
function mutation(arr) {

  return arr;
}

mutation(["Hello", "hey"]);
korzo
@korzo
Jul 19 2017 01:06
@Burinson .join will convert array to string
["Hello", "hey"].join(', ') will return Hello, hey
Raj Patel
@rajp1847
Jul 19 2017 01:07
how do i put my code in the black padding
korzo
@korzo
Jul 19 2017 01:08
@rajp1847 Wrap your code in ```
Raj Patel
@rajp1847
Jul 19 2017 01:08
how many
Uriel Guzmán
@Burinson
Jul 19 2017 01:08
@korzo Okay, that worked, had to give the value to arr
arr = arr.join(', ');
@korzo thanks
CamperBot
@camperbot
Jul 19 2017 01:08
burinson sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 268 | @korzo |http://www.freecodecamp.com/korzo
Raj Patel
@rajp1847
Jul 19 2017 01:08
So one in the front and one in the back? @korzo
korzo
@korzo
Jul 19 2017 01:08
@rajp1847 3 before code, 3 after code
Raj Patel
@rajp1847
Jul 19 2017 01:08
OHHHHHHHHHH!!!!!
THANKS!!!
korzo
@korzo
Jul 19 2017 01:09
@Burinson Yes, most of Array methods return new array/value, so you have to assign it to variable or return from function
Raj Patel
@rajp1847
Jul 19 2017 01:10
why doesnt the text be in a container
dont we have to put
<div class= "container"
korzo
@korzo
Jul 19 2017 01:12
@rajp1847 Which text? submenu?
Raj Patel
@rajp1847
Jul 19 2017 01:13
no the buy a house and sell a house text'
and also why is map and price side by side?
i put the code <font size="5"><a href="">Buy a House</a></fonts> <ul> <li><a href="">Map</a></li> <li><a href="">Price</a></li> <li><a href=""> School</a></li> <li><a href="">Feature</a></li>
korzo
@korzo
Jul 19 2017 01:16
@rajp1847 Don't use <font> tag
Raj Patel
@rajp1847
Jul 19 2017 01:16
help plz
and also why is map and price side by side?
why is the map and price
side by side
hover on by a house in my pen above
Buy a house
hoover on it
korzo
@korzo
Jul 19 2017 01:18
@rajp1847 You have opening tag <font> and closing </fonts>
Raj Patel
@rajp1847
Jul 19 2017 01:19
removed it
korzo
@korzo
Jul 19 2017 01:19
@rajp1847 It breaks syntax.
what does that mean
korzo
@korzo
Jul 19 2017 01:20
@rajp1847 Remove <font> and </fonts> from your code
Raj Patel
@rajp1847
Jul 19 2017 01:20
i did
here
Gregory Cheng
@gregorytcheng
Jul 19 2017 01:21
I’m working on my local weather project, and I can’t seem to pull json info from an API, even after copy/pasting code from the example. Anyone able to help? https://codepen.io/gregorytcheng/pen/jwWPPW
Raj Patel
@rajp1847
Jul 19 2017 01:22

<p class = "text-center" id = "footer">Created by <a href = "https://gregorytcheng.com/">Gregory Cheng</a>, Lehigh University. Powered by <a href = "https://darksky.net/dev/">Dark Sky API</a>.</p>
change the end Dark Sky API<
to what you want it to be
korzo
@korzo
Jul 19 2017 01:23
@gregorytcheng Your code does nothing, because you declare functions, but never call them
Kristi Nushi
@Kristi92
Jul 19 2017 01:23

var Bike = function() {

// Only change code below this line.

var gear= 0;

this.getGear = function() {
return gear;
};
this.setGear= function(change) {
gear= change;
};

var myCar = new Car();

var myBike = new Bike();

myBike.setGear(4);
};

can someone help me please
?
i don't know where my problem is in this case
korzo
@korzo
Jul 19 2017 01:24
@Kristi92 What is the name of challenge?
Kristi Nushi
@Kristi92
Jul 19 2017 01:25
Make object propreties private
@korzo can u help me?
korzo
@korzo
Jul 19 2017 01:27
@Kristi92 Sure
Gregory Cheng
@gregorytcheng
Jul 19 2017 01:27
@korzo Thanks. Must have not seen that haha. If I have any more issues, I’ll post it here.
CamperBot
@camperbot
Jul 19 2017 01:27
gregorytcheng sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 269 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Jul 19 2017 01:27
@Kristi92 Name of your constructor is wrong. It should be myBike, not Bike
Kristi Nushi
@Kristi92
Jul 19 2017 01:28
i change it but nothing is solved
korzo
@korzo
Jul 19 2017 01:28
@Kristi92 Sorry, wrong
Kristi Nushi
@Kristi92
Jul 19 2017 01:29
ok but i can't see where the prob. is
korzo
@korzo
Jul 19 2017 01:29
@Kristi92 It wors for me

@Kristi92 When I removed

var myCar = new Car();
var myBike = new Bike();
myBike.setGear(4);

tests passed

Kristi Nushi
@Kristi92
Jul 19 2017 01:31
nothing again
Raj Patel
@rajp1847
Jul 19 2017 01:31
elp plz
help plz
Manish Giri
@Manish-Giri
Jul 19 2017 01:32
@Kristi92 post your code
korzo
@korzo
Jul 19 2017 01:32
@Kristi92 Here is my code which passed the tests
var Bike = function() {
// Only change code below this line.
var gear= 0;
this.getGear = function() {
return gear;
};
this.setGear= function(change) {
gear= change;
};

};

var myCar = new Car();

var myBike = new Bike();
Kristi Nushi
@Kristi92
Jul 19 2017 01:33
@korzo thank you
CamperBot
@camperbot
Jul 19 2017 01:33
kristi92 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 270 | @korzo |http://www.freecodecamp.com/korzo
Raj Patel
@rajp1847
Jul 19 2017 01:33
:sparkles: :thumbsup: :sparkles:
help plz
Kristi Nushi
@Kristi92
Jul 19 2017 01:33
@Manish-Giri thanks
CamperBot
@camperbot
Jul 19 2017 01:33
kristi92 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6278 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 6278
help plz
HELP MEEEE
Manish Giri
@Manish-Giri
Jul 19 2017 01:35
@rajp1847 have you even posted the problem?
Raj Patel
@rajp1847
Jul 19 2017 01:35
ohh
if you hover on buy a house and the first thing
it is mixed
price and map
but in sell a house it isnt
Gregory Cheng
@gregorytcheng
Jul 19 2017 01:36
@korzo Fixed a few things. But the same problem still stands - I can’t seem to pull data from the Dark Sky API.
Raj Patel
@rajp1847
Jul 19 2017 01:36
@Manish-Giri
Raj Patel
@rajp1847
Jul 19 2017 01:37
nice
@gregorytcheng nice
korzo
@korzo
Jul 19 2017 01:37
@gregorytcheng If you open console, there is an error.
Raj Patel
@rajp1847
Jul 19 2017 01:38
https://codepen.io/rajp1847/pen/BZgoKw?editors=1000
if you hover on buy a house and the first thing
it is mixed
price and map
but in sell a house it isnt
korzo
@korzo
Jul 19 2017 01:38
@gregorytcheng No 'Access-Control-Allow-Origin' . It means, that https://api.darksky.net doesn't support CORS
@gregorytcheng From their FAQ
We take security very seriously at Dark Sky. As a security precaution we have disabled cross-origin resource sharing (CORS) on our servers.
Gregory Cheng
@gregorytcheng
Jul 19 2017 01:40
@korzo what am I doing in my code that is triggering CORS?
korzo
@korzo
Jul 19 2017 01:41
@gregorytcheng For request, you have to use CORS proxy. like https://crossorigin.me/ or https://cors-anywhere.herokuapp.com/
There is also FCC proxy, but I forgot the link :(
Manish Giri
@Manish-Giri
Jul 19 2017 01:41
@rajp1847 <font size="5"><a href="">Sell a House</a></fonts>
what tags are these?
around the a?
korzo
@korzo
Jul 19 2017 01:41
@gregorytcheng In ajax call you can't access other domain, unless server adds special header in response
Raj Patel
@rajp1847
Jul 19 2017 01:42
i deleted
those
the ma[ and price is still in the same line
Gregory Cheng
@gregorytcheng
Jul 19 2017 01:44
Hm, I’ll try using IP Geolocation instead.
korzo
@korzo
Jul 19 2017 01:45
@gregorytcheng Also you have undefined location. Your url looks like
https://api.darksky.net/forecast/a66c56cfa0c2cec51491e/undefined,undefined
Raj Patel
@rajp1847
Jul 19 2017 01:45
HE#LPPPPPPP
help
Raj Patel
@rajp1847
Jul 19 2017 01:51
helpp
korzo
@korzo
Jul 19 2017 01:52
@rajp1847 It's a lot of work and code to create dropdown menu. Try to take a look at some tutorial first. Here is a good one:
https://csswizardry.com/2011/02/creating-a-pure-css-dropdown-menu/
or
https://designmodo.com/css3-dropdown-menu/
Gregory Cheng
@gregorytcheng
Jul 19 2017 01:52
@korzo I’m trying with an IP API instead. Still not working. Seems to be drawing a problem with using https vs. http, but neither work for me. https://codepen.io/gregorytcheng/pen/jwWPPW
Stephen James
@sjames1958gm
Jul 19 2017 01:53
@gregorytcheng "https://ipinfo.io" I used this one as it supports https
korzo
@korzo
Jul 19 2017 01:53
@gregorytcheng You can use CORS proxy also for this
Stephen James
@sjames1958gm
Jul 19 2017 01:54
@gregorytcheng https://fcc-weather-api.glitch.me/api/current?lat=25.84&lon=-80.21 this is the link set up for FCC that
@gregorytcheng See - https://fcc-weather-api.glitch.me/
Kyle Holm
@thekholm80
Jul 19 2017 01:55
@Manish-Giri thanks
CamperBot
@camperbot
Jul 19 2017 01:55
thekholm80 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6279 | @manish-giri |http://www.freecodecamp.com/manish-giri
korzo
@korzo
Jul 19 2017 01:59
@sjames1958gm @gregorytcheng https://ipinfo.io is good, but it's blocked by most Adblockers
Gregory Cheng
@gregorytcheng
Jul 19 2017 01:59
I’ll try it out. It seems to be working!
Stephen James
@sjames1958gm
Jul 19 2017 01:59
@korzo Oh, don't use add blockers, so didn't know
Raj Patel
@rajp1847
Jul 19 2017 02:00
@Manish-Giri :star2:
how do i send a cookie to someone
aRtoo
@artoodeeto
Jul 19 2017 02:06
hi guys. i hae this animated elements. i want the input element to fadein after onLoad then it will slide to the right 200px. but the slide to the right isnt working. any idea? heres my code:
$('input').addClass('animated fadeIn', function() {
    $('input').animate({
        right: 2000
     })
  });
Gregory Cheng
@gregorytcheng
Jul 19 2017 02:07
@sjames1958gm @korzo IP is working. Thanks!
CamperBot
@camperbot
Jul 19 2017 02:07
gregorytcheng sends brownie points to @sjames1958gm and @korzo :sparkles: :thumbsup: :sparkles:
:warning: gregorytcheng already gave korzo points
:star2: 8107 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Raj Patel
@rajp1847
Jul 19 2017 02:09
help plz
Joseph
@revisualize
Jul 19 2017 02:11
@rajp1847 With????
To send a brownie point you just need to thank someone while tagging their username.
Raj Patel
@rajp1847
Jul 19 2017 02:12
https://codepen.io/rajp1847/pen/BZgoKw?editors=1000
if you hover on buy a house and the first thing
it is mixed
price and map
but in sell a house it isnt
plz help with this
HELP PLEasE
Gregory Cheng
@gregorytcheng
Jul 19 2017 02:28
Still getting an error here. Keep getting an undefined ZIP code: https://codepen.io/gregorytcheng/pen/jwWPPW
Never mind. Got it!
Morchid Chellali
@Morched23MJ
Jul 19 2017 02:40
I did create a twitter button to tweet the quote I get, instead of tweeting the quote, it's tweeting the page url, https://codepen.io/Morched23MJ/pen/dRLgJo
korzo
@korzo
Jul 19 2017 02:41
@Morched23MJ That's how twitter wisget works. You need to use tweet url
@Morched23MJ https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=' + encodeURIComponent('"' + currentQuote + '" ' + currentAuthor)
Morchid Chellali
@Morched23MJ
Jul 19 2017 02:44
Where do I put this?
Eric Miller
@ericmiller777
Jul 19 2017 02:45
hey guys i had this code wording 1 sec ago now it stooped working :(
function mutation(arr) {
  var count = 0;
  for (var i = 0; i < arr[0].length; i++){
    if (arr[0][i].indexOf(arr[1][i]) == 0){
      count++;
    }
    if (count >= arr[1].length){
      return count;
    }else if(count < arr[1].length){
      return count;
    }
  }

}

mutation(["hello", "hello"]);
count should be 5
i undid somthing
korzo
@korzo
Jul 19 2017 02:46
@Morched23MJ You need to remove twitter widget and add link instead. Then on quote change, change url of link
Eric Miller
@ericmiller777
Jul 19 2017 02:49
:(
korzo
@korzo
Jul 19 2017 02:49
@ericmiller777 You should lowercase both strings in array and loop second string, not first. And at first error, you can return false, at the end of the function true
Morchid Chellali
@Morched23MJ
Jul 19 2017 02:50
What the algorithm does? so I can see if that's what you're doing?
Eric Miller
@ericmiller777
Jul 19 2017 02:50
@korzo yes that is fine im gonna do that next
but 1 sec ago i had that counting
just fine
compares the first letter in each string returns the count
now its not what did i mess up
why is count not incrementing
Morchid Chellali
@Morched23MJ
Jul 19 2017 02:53
AH
I think instead of ==0 it should be == i
@ericmiller777
Eric Miller
@ericmiller777
Jul 19 2017 02:54
@Morched23MJ well i mean when it compares each letter if it matchs indexOf returns 0
if not it returns -1
so for each time its 0 i want count++
Morchid Chellali
@Morched23MJ
Jul 19 2017 02:54
No? it returns where it finds it
Eric Miller
@ericmiller777
Jul 19 2017 02:54
it was working fine, then i screwed it so i undid a couple things but i went to far
korzo
@korzo
Jul 19 2017 02:54
@ericmiller777 0 is first letter
Now that you did == 0, count should return 1
korzo
@korzo
Jul 19 2017 02:55
@ericmiller777 it should be arr[0][i].indexOf(arr[1][i]) !== -1
Morchid Chellali
@Morched23MJ
Jul 19 2017 02:56
I think korzo is right.
Joseph
@revisualize
Jul 19 2017 02:57
https://www.packtpub.com/packt/offers/free-learning
Book of the day:
Git: Version Control for Everyone
Eric Miller
@ericmiller777
Jul 19 2017 02:57
still not returning count just 1 :(
Morchid Chellali
@Morched23MJ
Jul 19 2017 02:57
You tried i?
Eric Miller
@ericmiller777
Jul 19 2017 02:57
@revisualize i plan to switch to git for projects
@Morched23MJ yes
what did i erase....
korzo
@korzo
Jul 19 2017 02:57
@ericmiller777 correction arr[0][i].indexOf(arr[1]) !== -1
Eric Miller
@ericmiller777
Jul 19 2017 02:58
still nothing :( sorry to bother you guys its just this thing is driving me insane
korzo
@korzo
Jul 19 2017 03:00
@ericmiller777 Because your condition is inside loop and it returns after 1. iteration
@ericmiller777 But the logic is wrong and mutation(["voodoo", "no"]) will fail, because there are 4 o's, but no n
Joseph
@revisualize
Jul 19 2017 03:02
@ericmiller777 Good plan.
@ericmiller777 There is also: https://rogerdudler.github.io/git-guide/
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:06
@korzo, can you help me out?
I can't see how to do that
korzo
@korzo
Jul 19 2017 03:07
@Morched23MJ Twitter button?
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:07
Yup
korzo
@korzo
Jul 19 2017 03:08
@Morched23MJ remove twitter widget and at its place create same looking link
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:09
I remove the script?
korzo
@korzo
Jul 19 2017 03:09
@Morched23MJ Ok, sorry, forgot to refresh
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:15
It doesn't work? and the tweet button is not appearing pretty well
korzo
@korzo
Jul 19 2017 03:17
@Morched23MJ Doesn't work? It doesn't open new tab with quote as tweet content?
Mike Batista
@mbmontana
Jul 19 2017 03:19
Almost finished my Tribute page but when I click on these links to YouTube videos all I get in CodePen is a blank white screen.
<ul><li>Check out clips from Rodney Carter's 1988 performance against the Broncos <a href="https://www.youtube.com/watch?v=zMlulr0_oSw">here.</a></li>
      <li>Check out Rodney Carter's <a href="https://www.youtube.com/watch?v=RkfXSb6XILw">two receptions</a> on the Steelers' game-winning drive in their 1988 upset win at Houston.</li></ul>
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:20
Can you give the link to your codepen page?
korzo
@korzo
Jul 19 2017 03:21
@mbmontana add target="_blank" to links
Mike Batista
@mbmontana
Jul 19 2017 03:21
@korzo Where in the code do I add it?
korzo
@korzo
Jul 19 2017 03:22
@mbmontana <a href="https://www.youtube.com/watch?v=RkfXSb6XILw" target="_blank" >two receptions</a>
Mike Batista
@mbmontana
Jul 19 2017 03:23
@korzo Is that only with YouTube videos? I don't remember this from the HTML challenges.
korzo
@korzo
Jul 19 2017 03:24
@mbmontana It will open link at new tab instead in iframe. Add it to all external links
@mbmontana Sometimes external link doesn't load in iframe on codepen
Eric Miller
@ericmiller777
Jul 19 2017 03:25
okay guy looked for another way to solve it
function mutation(arr) {
  var count = 0;
  var firstWord = arr[0];
  var secondWord = arr[1];
  firstWord = firstWord.toLowerCase();
  secondWord = secondWord.toLowerCase();
  for (var i = 0; i < secondWord.length; i++){
    if (firstWord.indexOf(secondWord[i]) < 0){
      return false;
   }
    return true;
  }

}

mutation(["hello", "hey"]);
I only fail there
comes back true
korzo
@korzo
Jul 19 2017 03:27
@ericmiller777 Which test fails?
Eric Miller
@ericmiller777
Jul 19 2017 03:27
mutation(["hello", "hey"]) should return false.
korzo
@korzo
Jul 19 2017 03:29
@ericmiller777 return true should be outside of loop
Eric Miller
@ericmiller777
Jul 19 2017 03:30
wtf
why
korzo
@korzo
Jul 19 2017 03:30
@ericmiller777 You return true only after all letters pass
Eric Miller
@ericmiller777
Jul 19 2017 03:30
why did that work
@korzo thanks
CamperBot
@camperbot
Jul 19 2017 03:30
ericmiller777 sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 271 | @korzo |http://www.freecodecamp.com/korzo
Eric Miller
@ericmiller777
Jul 19 2017 03:30
why did else mess it up?
korzo
@korzo
Jul 19 2017 03:34
@ericmiller777 Coincidence :) Words in tests exactly matched your algorithm
NDuma
@NDuma
Jul 19 2017 03:34
Trying to figure something out in https://gitter.im/FreeCodeCamp/HelpFrontEnd regarding JavaScript on www.cryptowat.ch for the Order Depth % Market Move
Hop over if interested please - don't want to duplicate ... or do I?
mstellaluna
@mstellaluna
Jul 19 2017 03:41
@Manish-Giri ty.. ty..ty.. ty :bow: :tea:
CamperBot
@camperbot
Jul 19 2017 03:41
mstellaluna sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6280 | @manish-giri |http://www.freecodecamp.com/manish-giri
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:44
korzo, why in the console I found the following message error:
Refused to display 'https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=%27%20+%20encodeURIComponent(%27' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self'".
@korzo
korzo
@korzo
Jul 19 2017 03:45
@Morched23MJ add target="_blank" to link
@Morched23MJ To open it in new tab. It will not load in iframe because of CSP
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:47
Alright, the error is no longer here, but the tweet page isn't showign
here is the code I did for that
@korzo
korzo
@korzo
Jul 19 2017 03:50
@Morched23MJ wrong selector
@Morched23MJ $(a).attr
@Morched23MJ It should be $('a').attr(
@Morched23MJ or even better $('.twitter-share-button').attr
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:52
Tried all of them, nothing works
korzo
@korzo
Jul 19 2017 03:55
@Morched23MJ It works. But you missed encodeURIComponent from url. Also quote has html in it, so you have to remove it. Take a look at url at my fork
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:57
The same in your fork
It doesn't work, just loads the debug page
korzo
@korzo
Jul 19 2017 03:58
@Morched23MJ did you load quote? Because url is empty on load, it's changed after first qoute is fetched from api
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:59
Lwn
korzo
@korzo
Jul 19 2017 03:59
@Morched23MJ You should hide twitter button until first quote
Morchid Chellali
@Morched23MJ
Jul 19 2017 03:59
Owh*, it worked, thanks @korzo
CamperBot
@camperbot
Jul 19 2017 03:59
morched23mj sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 272 | @korzo |http://www.freecodecamp.com/korzo
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:00
I will see how to do that
But can you tell me why the button appears in that way? @korzo
korzo
@korzo
Jul 19 2017 04:01
@Morched23MJ Because it's link, not button.
Throw some css at it. It will be easy to make it look like original twitter button or "New quote"
@Morched23MJ Also you should truncate text to fit it in 140 characters
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:06
Don't see how. :l
korzo
@korzo
Jul 19 2017 04:07
@Morched23MJ use substring or slice. there is challenge "Truncate a string"
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:08
Ehm, for the tweet button, how can I import a tweet button from twitter dev site
korzo
@korzo
Jul 19 2017 04:14
@Morched23MJ do you mean css styles?
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:15
I want those original buttons of tweet
korzo
@korzo
Jul 19 2017 04:17
@Morched23MJ you can't use original twitter button, because you can't change text on it once is rendered.
You will have to remove button and render it again after every quote change
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:17
https://codepen.io/Morched23MJ/pen/dRLgJo?editors=1010
Can you check out what's wrong with what I did to trunc the string longer than 120? letting 20 characters for the author name
korzo
@korzo
Jul 19 2017 04:18
@Morched23MJ Inspect original button with developer tools and copy css properties
@Morched23MJ You broke the code, because you changed class on tweet link. Also you added function as a selector.
https://codepen.io/korzo/pen/yXdOGj
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:24
I know, but how to check then if it's more than 140?
korzo
@korzo
Jul 19 2017 04:25
@Morched23MJ Teke a look at my fork. you pass the text from h4 into function More140($('h4').text())
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:28
Why it doesn't work? :O
korzo
@korzo
Jul 19 2017 04:29
@Morched23MJ bacause you changed class, but not selector in $
$('.twitter-share-button')
korzo
@korzo
Jul 19 2017 04:37
@Morched23MJ Gotta go. 6.30 AM here. Happy coding
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:38
I got it fixed, thank you man, I really appreciate your help, @korzo
CamperBot
@camperbot
Jul 19 2017 04:38
morched23mj sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:warning: morched23mj already gave korzo points
korzo
@korzo
Jul 19 2017 04:38
@Morched23MJ Glad to help
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:38
Now, if I wanted to use the post.content in that first block, in another block of JS, how to set a global var?
@korzo
korzo
@korzo
Jul 19 2017 04:41

@Morched23MJ Yes, above $('#NewQuote').on

Also you should wrap your code in $(document).ready(function() {});

Morchid Chellali
@Morched23MJ
Jul 19 2017 04:42
But, if I do var content = post.content; it works? even before the request from the API?
korzo
@korzo
Jul 19 2017 04:43
@Morched23MJ No
At the top of your code:
var content;
then somewhere after api request content = post.content
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:44
Then I can use it in another independent block out of API block?
korzo
@korzo
Jul 19 2017 04:45
Yes. anywhere 'under' in the code structure
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:46
Alright. Any ideas if I wanted to change that a element into something better? it looks ugly
korzo
@korzo
Jul 19 2017 04:47
@Morched23MJ Make it look as original button.
It's easy. Open original button in Developer tools and copy css properties.
@Morched23MJ Gotta go. 7AM. If in trouble, shoot me a message. I'll take a look, when I wake up
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:50
Alright, thanks man. Have an awesome sleep, lol
Sanket Singh
@sanketsingh27
Jul 19 2017 04:52
hey there i have a small problem in java script
Morchid Chellali
@Morched23MJ
Jul 19 2017 04:57
Perhaps I could help out. What's up?
Sanket Singh
@sanketsingh27
Jul 19 2017 05:02
i was trying to execute this

<!DOCTYPE html>

<html>
<body>

<p id="demo"></p>
<p id="demo1"></p>

<script>
function Person(first, last, age, eye) {
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eye;
}

var myFather = new Person("John", "Doe", 50, "blue");
var myMother = new Person("Sally", "Rally", 48, "green");

myFather.name = function() {
return this.firstName + " " + this.lastName;
};

document.getElementById("demo").innerHTML =
"My father is " + myFather.name();

myMother.name=function(){
return this.firstname + " " +this.lastname;
};

document.getElementByID("demo1").innerHTML=
"My mother is " +myMother.name();


</script>

</body>
</html>

i dont understand why it is not giving o/p for myMother
Viktor Tiutiun
@vittorioVT
Jul 19 2017 05:04
@sanketsingh27 don't new Person
Sanket Singh
@sanketsingh27
Jul 19 2017 05:04
@vittorioVT i didnt understand
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 19 2017 05:05
@sanketsingh27 you have a codepen for this?
Sanket Singh
@sanketsingh27
Jul 19 2017 05:07
i will set it now
Viktor Tiutiun
@vittorioVT
Jul 19 2017 05:07
@sanketsingh27 var myFather = new Object("John", "Doe", 50, "blue");
Viktor Tiutiun
@vittorioVT
Jul 19 2017 05:11
@sanketsingh27 var obj = new Object(); don't "new Person"
Sanket Singh
@sanketsingh27
Jul 19 2017 05:12
person is the prototype
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 19 2017 05:13
@vittorioVT he's making a new type of Object with Person(first, last, age, eye) parameters
Sanket Singh
@sanketsingh27
Jul 19 2017 05:15
yes got it ... it is working now .. it was a typo ... thanks for the help
Viktor Tiutiun
@vittorioVT
Jul 19 2017 05:15
write this in code: Object.setPrototypeOf()
Sanket Singh
@sanketsingh27
Jul 19 2017 05:15

function Person(first, last, age, eye) {
this.firstName = first;
this.lastName = last;
this.age = age;
this.eyeColor = eye;
}

var myFather = new Person("John", "Doe", 50, "blue");
var myMother = new Person("Sally", "Rally", 48, "green");

myFather.name = function() {
return this.firstName + " " + this.lastName;
};

console.log("My father is " + myFather.name());

myMother.name = function( ){
return this.firstName + " " +this.lastName;
};

console.log("My mother is " +myMother.name());

this is working
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 19 2017 05:16
@sanketsingh27 good
Viktor Tiutiun
@vittorioVT
Jul 19 2017 05:18
sorry my bad :smile:
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 19 2017 05:18
@vittorioVT you were still right, but he's making his own Objects instead of using a default thing
right answer to the wrong problem lol
Veronica Eulenberg
@HappyViki
Jul 19 2017 05:26
I need help with regex. I don’t remember a certain function, or maybe I don’t remember what it’s called…or how to use it.
var calculate = "2+2"; calculate.replace(calculate.match(/(\d)[+](\d)/g),$1+$2)'
eddbernal
@eddbernal
Jul 19 2017 05:31
hello, can anyone help me with some intermediate algorithms ?
Morchid Chellali
@Morched23MJ
Jul 19 2017 05:49
I could, even though didn't reach them yet. I'm good with algos, what's up?
@eddbernal
Oleh
@Lufter
Jul 19 2017 06:04

Hello Guys,
I'm done with Weather App, and i would like to ask you for a few things.

  1. Could you please provide me with a screenshot of the tab with my Pen
  2. Does anybody know why my Pen is not showing on Mobile?

Random Quotes are showing on my iPhone and Samsung, but Weather App Pen is not showing... and I'm really wondering what the hack...

Johnyboi21
@Johnyboi21
Jul 19 2017 06:17
Adding a default option in Switch statements from the javascript part of the course
why is this wrong???

case "a":
answer="apple";
break;
case "b":
answer="bird";
break;
case "c":
answer="cat";
break;

default:
answer="stuff";

Coy Sanders
@coymeetsworld
Jul 19 2017 06:19
why are you posting the same question in 3 different chats @Johnyboi21 ?
Johnyboi21
@Johnyboi21
Jul 19 2017 06:20
@coymeetsworld because i'm confused why it says im missing a semi colon for my first case even tho it's not what the example shows
Coy Sanders
@coymeetsworld
Jul 19 2017 06:20
thats why you're posting it in 3 rooms?
Viktor Tiutiun
@vittorioVT
Jul 19 2017 06:21
he is experimenting
Johnyboi21
@Johnyboi21
Jul 19 2017 06:21
yup
Viktor Tiutiun
@vittorioVT
Jul 19 2017 06:21
:smile:
Coy Sanders
@coymeetsworld
Jul 19 2017 06:21
just annoys people that register in the rooms, especially when they ask them a question on the problem in another room....
Johnyboi21
@Johnyboi21
Jul 19 2017 06:23
wait, it's annoying because i'm asking for help?
Coy Sanders
@coymeetsworld
Jul 19 2017 06:24
in 3 different rooms when people are responding to you? yes
someone else responded to you in the other room too
Johnyboi21
@Johnyboi21
Jul 19 2017 06:25
who?
Coy Sanders
@coymeetsworld
Jul 19 2017 06:25
go look in HelpFrontEnd, it is literally the last thing written
Johnyboi21
@Johnyboi21
Jul 19 2017 06:26
tried it, didn't work
Coy Sanders
@coymeetsworld
Jul 19 2017 06:27
tried what? they asked you to give your whole code. You're not posting enough information. They also asked you to format it
Johnyboi21
@Johnyboi21
Jul 19 2017 06:29
@coymeetsworld don't know how to format it to look nice on here
Coy Sanders
@coymeetsworld
Jul 19 2017 06:29
wow dude
please, read what the person wrote to you on HelpFrontEnd. They literally point out how to do it for you
Johnyboi21
@Johnyboi21
Jul 19 2017 06:32
@coymeetsworld never mind, sorry i'll just utube it or something, feeling the love :smile:
Coy Sanders
@coymeetsworld
Jul 19 2017 06:33
next time just post in one room, unless no one answers you at all
was willing to help in main room, but then it got ignored and you just mass spammed. I find that a little annoying, sorry
Johnyboi21
@Johnyboi21
Jul 19 2017 06:33
@coymeetsworld didn't realize he was trying to help, i just saw the '' and thought he wanted me to remove them from the letters next to the cases
thats why i moved to other rooms
Coy Sanders
@coymeetsworld
Jul 19 2017 06:34
so instead of responding to clarify
you just ignore him completely, and go into another room and ask for help from other people? Does that seem right to you?
Jonathan Cunanan
@jcunanan05
Jul 19 2017 06:34
hello so i'm new to progressive or dynamic page. i have a url /dashboard clicking on a button and fetching some data without reloading works. Is there a way when i visit /dashboard/someMenu it will load the dashboard and fetch the data to the page? i saw it in habitica :)
Johnyboi21
@Johnyboi21
Jul 19 2017 06:34
lol ok dad
Coy Sanders
@coymeetsworld
Jul 19 2017 06:35
go ahead and laugh, remember you need the help, we don't need to help you. I don't think what I'm saying is unreasonable
if you cant even give someone a response then why should they bother with you? good luck cheating on youtube
Johnyboi21
@Johnyboi21
Jul 19 2017 06:37
@coymeetsworld just banter m8 :)
Coy Sanders
@coymeetsworld
Jul 19 2017 06:37
no it wasn't, but ok I'm dropping it. Good luck on a more serious note.
Johnyboi21
@Johnyboi21
Jul 19 2017 06:37
literally was just a misunderstanding lad
Coy Sanders
@coymeetsworld
Jul 19 2017 06:37
ok
more people are helping you in the other room, btw
sherryzxj
@sherryzxj
Jul 19 2017 06:38
i am a FCC freshman . i want to add an anchor, i already put: <a herf="http://freecatphotoapp.com ">link to cat photos</a> into page , but FCC's system told me that i still need to add a link to http://freecatphotoapp.com? why?
Coy Sanders
@coymeetsworld
Jul 19 2017 06:38
@sherryzxj you misspelled href
href stands for Hypertext REFerence
sherryzxj
@sherryzxj
Jul 19 2017 06:39
@coymeetsworld Thank u ~
CamperBot
@camperbot
Jul 19 2017 06:39
sherryzxj sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 2979 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jul 19 2017 06:39
np
coldcuts
@warmcoldcuts
Jul 19 2017 06:44
hey guys on the build portfolio webpage, are you supposed to do that after just learning jQuery, because it look really complicated and a lot of it doesn't seem like what I've learn in jQuery and hmtl css
Coy Sanders
@coymeetsworld
Jul 19 2017 06:44
@warmcoldcuts portfolio is before JavaScript/jQuery, you don't need either to do a basic portfolio
Any suggestions to make this more responsive?
Coy Sanders
@coymeetsworld
Jul 19 2017 06:45
portfolio you really just need HTML and CSS. If you want, Bootstrap to make layout and some other things easier
Morchid Chellali
@Morched23MJ
Jul 19 2017 06:45
In addition, when I hover over the tweet button I don't want a line to appear under it, because it's in an <a> element
coldcuts
@warmcoldcuts
Jul 19 2017 06:46
@coymeetsworld but it has buttons that when you click it scrolls down to that section, I don't remember that
Coy Sanders
@coymeetsworld
Jul 19 2017 06:46
that isn't a requirement, that's just in an example
you don't have to do something that is like the portfolio example, thats just a better-than-average example
Johnyboi21
@Johnyboi21
Jul 19 2017 06:47
@Morched23MJ cant u fix that with css and like a list style
text-decoration:none; i think
Coy Sanders
@coymeetsworld
Jul 19 2017 06:47
all you need to do is complete the User Stories
coldcuts
@warmcoldcuts
Jul 19 2017 06:48
@coymeetsworld oh ok thanks, because the example page look really intimidating to replicate
CamperBot
@camperbot
Jul 19 2017 06:48
warmcoldcuts sends brownie points to @coymeetsworld :sparkles: :thumbsup: :sparkles:
:star2: 2980 | @coymeetsworld |http://www.freecodecamp.com/coymeetsworld
Coy Sanders
@coymeetsworld
Jul 19 2017 06:48
@warmcoldcuts don't worry about it, just try to do something basic
can always go back and improve on your projects later on, thats' what I did
coldcuts
@warmcoldcuts
Jul 19 2017 06:49
just finished my tribute, https://codepen.io/coldcuts/pen/rwExOe
Coy Sanders
@coymeetsworld
Jul 19 2017 06:49
yeah thats good, I would align the "achievements" though in the center
coldcuts
@warmcoldcuts
Jul 19 2017 06:51
you mean the bullet points?
or the whole section
Johnyboi21
@Johnyboi21
Jul 19 2017 06:52
@warmcoldcuts the bullet points
and the <p> under ur picture
coldcuts
@warmcoldcuts
Jul 19 2017 06:52
oh ok
Johnyboi21
@Johnyboi21
Jul 19 2017 06:53
u can do like <li><center></li></center> to all of them
Coy Sanders
@coymeetsworld
Jul 19 2017 06:54
that's not nested correctly, also don't use center tags, those are deprecated
should align with CSS code
Viktor Tiutiun
@vittorioVT
Jul 19 2017 06:54
@warmcoldcuts in container-fluid should be rows and columns or at least rows
Johnyboi21
@Johnyboi21
Jul 19 2017 06:54
i was about to say that actaully lol
actually*
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 19 2017 06:54
@warmcoldcuts if you're gonna use bootstrap, might as well use the grid system they have
Morchid Chellali
@Morched23MJ
Jul 19 2017 06:59
Thanks, @Johnyboi21
CamperBot
@camperbot
Jul 19 2017 06:59
morched23mj sends brownie points to @johnyboi21 :sparkles: :thumbsup: :sparkles:
:cookie: 192 | @johnyboi21 |http://www.freecodecamp.com/johnyboi21
coldcuts
@warmcoldcuts
Jul 19 2017 07:20
ok maybe I need to go back to bootstrap, did leave off about a week. I thought if you put every thing in div fluid-container it will just resize everything to screen, and that's all you need to do, and col is just for if you need rows and columns
coldcuts
@warmcoldcuts
Jul 19 2017 07:29
@coymeetsworld does this work for the "achievements" align center <p style="color: #EB6E1E" class="text-center">Some career records and acheivements:</p>
<ul style="color: #EB6E1E" class="text-center">
Coy Sanders
@coymeetsworld
Jul 19 2017 07:33
idk, does it look centered when you do that?
BrewCoffeeSplash
@BrewCoffeeSplash
Jul 19 2017 07:34
@warmcoldcuts you need the "row" and the col- if you want mobile responsive
@warmcoldcuts just a basic check on your codepen shows it's not responsive
use the devtools on your browser
@warmcoldcuts if you're using mozilla-firefox, ctrl+shift+m should show you how it looks on different sized screens. Responsive design mode, looks like a phone
Morchid Chellali
@Morched23MJ
Jul 19 2017 07:38
I want to change the backgrounds of my page on every click, how do I do that?
My idea, is that, I first create a function, inside a var, array of urls of backgrounds, then I target the background on css, url, and I change it on every click of a button, can anyone help me with the code?
heroiczero
@heroiczero
Jul 19 2017 08:00
@Morched23MJ you could probably use Jquery and https://www.w3schools.com/jsref/jsref_random.asp
Dovydas Stirpeika
@Giveback007
Jul 19 2017 10:01
how to wrap a parent in an anchor element without children being affected in html
Abhishek Agrawal
@abhiagra94
Jul 19 2017 10:27

someone please help me with counting card algoritham
i have written this

var count = 0;

function cc(card) {
// Only change code below this line
if (card == 2 || 3 || 4 ||5 || 6) {
count= count+1;
}
if (card== 7 || 8){
count = count;
}
if (card== 10 || 'J' || 'Q' || 'K' || 'A'){
count= count-1;
}

return count;

// Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(7); cc('K'); cc('A');

what's wrong ?
Bilal Mahmood Malik
@BilalMalik10
Jul 19 2017 10:38
@abhiagra94 I think there is something wrong with your if statement.
try this if(card==2||card==3||card==4||card==5||card==6)
and correct all remaining if statements
Adish Jain
@Adishjain58
Jul 19 2017 10:46
for portofolio page how to add navigation buttons??
anyone here who can help?
Adit
@adittyagi
Jul 19 2017 11:29
Make a navbar
Victor Popescu
@VicPopescu
Jul 19 2017 11:32
@Adishjain58 well you can build a custom navbar or learn to use bootstrap nav
Morchid Chellali
@Morched23MJ
Jul 19 2017 11:33
You can use Bootstrap 4, here is the link: https://hackerthemes.com/bootstrap-cheatsheet/
You can find most of what you need there.
Seah Eng Chye
@Seahchye
Jul 19 2017 11:42
Hi, how do i centralise an unordered list?
Morchid Chellali
@Morched23MJ
Jul 19 2017 11:43
Put it in a <div class="container-fluid"><ol></ol></div>, and see if it works?
Stephen James
@sjames1958gm
Jul 19 2017 11:45
@Seahchye If you aren't using bootstrap you can use margin: 0 auto I believe
knight2
@knight2
Jul 19 2017 11:46

Is anyone here familiar with React and using PropTypes?

I am doing the Beta FCC React section, and while the code works in the browser, I can't find the proper configuration for codepen.

React website says to
import PropTypes from 'prop-types'; https://facebook.github.io/react/docs/typechecking-with-proptypes.html

I also have the latest version included
https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html

But my code won't run and nothing shows up in console.

My codepen is here
https://codepen.io/knight2/pen/ModPYv

Was wondering if someone could take a look at my javascript settings/code and let me know what is the proper way to have prop-types work?

Seah Eng Chye
@Seahchye
Jul 19 2017 11:49
@sjames1958gm I am using HTML/CSS on codepen
yinxiaoming
@yinxiaoming
Jul 19 2017 11:54
https://www.freecodecamp.cn/challenges/create-a-set-of-radio-buttons#?solution=<link href%3D"https%3A%2F%2Ffonts.gdgdocs.org%2Fcss%3Ffamily%3DLobster" rel%3D"stylesheet" type%3D"text%2Fcss">%0A<style>%0A .red-text {%0A color%3A red%3B%0A }%0A%0A h2 {%0A font-family%3A Lobster%2C Monospace%3B%0A }%0A%0A p {%0A font-size%3A 16px%3B%0A font-family%3A Monospace%3B%0A }%0A%0A .thick-green-border {%0A border-color%3A green%3B%0A border-width%3A 10px%3B%0A border-style%3A solid%3B%0A border-radius%3A 50%25%3B%0A }%0A%0A .smaller-image {%0A width%3A 100px%3B%0A }%0A<%2Fstyle>%0A%0A<h2 class%3D"red-text">CatPhotoApp<%2Fh2>%0A%0A<p>Click here for <a href%3D"%23">cat photos<%2Fa>.<%2Fp>%0A%0A<a href%3D"%23"><img class%3D"smaller-image thick-green-border" alt%3D"A cute orange cat lying on its back" src%3D"%2Fimages%2Frelaxing-cat.jpg"><%2Fa>%0A%0A<p>Things cats love%3A<%2Fp>%0A<ul>%0A <li>cat nip<%2Fli>%0A <li>laser pointers<%2Fli>%0A <li>lasagna<%2Fli>%0A<%2Ful>%0A<p>Top 3 things cats hate%3A<%2Fp>%0A<ol>%0A <li>flea treatment<%2Fli>%0A <li>thunder<%2Fli>%0A <li>other cats<%2Fli>%0A<%2Fol>%0A<form fccfaa%3D"%2Fsubmit-cat-photo">%0A <input type%3D"text" placeholder%3D"cat photo URL" required>%0A <button type%3D"submit">Submit<%2Fbutton>%0A <br>%0A <lable><input type%3D"radio" name%3D"indoor-outdoor">indoor<%2Flable> %0A%0A <lable><input type%3D"radio" name%3D"indoor-outdoor">outdoor<%2Flable> %0A %0A<%2Fform>%0A
Ravi Kishore Thella
@ravikishorethella
Jul 19 2017 12:10
@yinxiaoming paste your code in between three backticks(```)
```
code
```
just1witness
@just1witness
Jul 19 2017 12:17
   if (navigator.geolocation){
    navigator.geolocation.getCurrentPosition(function(position){
      $("#data").html("latitude: " + position.coords.latitude + "<br>longitude: " + position.coords.longitude);

    });
   }
  var weatherCond = "https://query.yahooapis.com/v1/public/yql?q=select%20item.condition%20from%20weather.forecast%20where%20woeid%20%3D%202487889&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys/";

  $.getJSON(weatherCond, function (data) {

  var results = data.query.results
  var firstResult = results.channel.item.condition
  console.log(firstResult);

  var location = 'Unknown' 
  var temp = firstResult.temp
  var text = firstResult.text

  $('#temp').append('Current Temperature: ' + temp + '&deg;F');

  $('#weather').append('Weather Outlook: ' + text); 



   console.log('ready');
$("#c").on("click", myFunction);
 function myFunction() {
   console.log('Clicked');

  var celsius = (temp -32)*.5556; 
  var converted = Math.ceil(celsius);
converted =  $('#temp').html('Current Temperature: ' + converted + '&deg;C');

}


    console.log('ready');
$("#f").on("click", nextFunction);
 function nextFunction() {
   console.log('Clicked');

  var fahrenheit = temp;  
fahrenheit =  $('#temp').html('Current Temperature: ' + fahrenheit + '&deg;F');
 }


  window.onload = function(){

    function checkForcast(){
    document.getElementById(text).value;


    if (text == "Rain" || text == "Rainy"){
$('#image').removeClass('cloudy').addClass('rain');     
    }

      if (text == "Snow" || text == "Snowy"){
$('#image').removeClass('cloudy').addClass('snow');     
    }

    if (text == "Sun" || text == "Sunny"){
$('#image').removeClass('cloudy').addClass('sunny');    
    }  

     if (current == "Weather Outlook: Cloudy"){  $('#image').removeClass('cloudy').addClass('partly');  
     }
    } 
  }
});
});
I can't get the change class "if" functions to run, can someone please tell me what I'm missing? (I'm trying to change a css class in a <div> html tag.
The <div> tags ID is #image.
Tzahi
@Tzahile
Jul 19 2017 12:37
Hi guys, did anyone notice a strange behaviour in FCC Beta?
Stephen James
@sjames1958gm
Jul 19 2017 12:44
@just1witness your window.onload is assigned inside of your getJSON callback, if the page has already loaded those won't be called.
Maybe move/remove window.onload to wrap the whole get current position and getJSON?
Eric Weiss
@eweiss17
Jul 19 2017 12:45
@Tzahile ya like it keeps breaking?
Stephen James
@sjames1958gm
Jul 19 2017 12:50
@knight2 Try https://unpkg.com/prop-types/prop-types.min.js rather than import
just1witness
@just1witness
Jul 19 2017 12:50
@sjames1958gm I'm trying to figure out how to do that right.
Stephen James
@sjames1958gm
Jul 19 2017 12:51
@just1witness You have a function called checkForcast, which I don't see called? Maybe remove the window.onload for now?
just1witness
@just1witness
Jul 19 2017 12:52
@sjames1958gm I removed it, but it doesn't seem to make a difference
Stephen James
@sjames1958gm
Jul 19 2017 12:53
@just1witness So where do you call checkForcast?
just1witness
@just1witness
Jul 19 2017 12:54

I just need to be able to compare the value of the variable "text" with certain words, then change the class if their found.

as for check forcast being called... I've deleted and rewrote that section so many times, I don't even know whats going on anymore, what you see now could very well be incomplete...

they're*
Stephen James
@sjames1958gm
Jul 19 2017 12:55
@just1witness I don't think you need a function there, just have the if / else if / else without a function around it
just1witness
@just1witness
Jul 19 2017 12:56
I've stared at this too long, and changed it too many times
@sjames1958gm K, I'll try that now
@sjames1958gm yeah, still not working. It seems like it should be so simple.
Stephen James
@sjames1958gm
Jul 19 2017 12:58
@just1witness Do you have this in codepen?
just1witness
@just1witness
Jul 19 2017 12:59

@Yeah, here you go.

https://codepen.io/Just1witness/pen/BZRozr?editors=0010

I've been changing the comparison term to whatever the forcast currently is (it changes) to test if the class changes or not.

@sjames1958gm
Adish Jain
@Adishjain58
Jul 19 2017 13:03
guys check my portfolio page
any recommendations or reviews?
Ravi Kishore Thella
@ravikishorethella
Jul 19 2017 13:10
@Adishjain58 the design looks good :thumbsup:
align the <a> tags to right in the navbar
Adish Jain
@Adishjain58
Jul 19 2017 13:11
how to do that??
Ken Haduch
@khaduch
Jul 19 2017 13:11
@Adishjain58 - looks like a good start on your page. A few things:
  • You probably wouldn't want to put the words "Navigation Bar" on the navbar... Also it is not responsive, at least not in the style of the collapsible navbar that you can find the example on the Bootstrap pages. The problem with that you have is that on a mobile device it will probably occupy the top third of the screen. The collapsible one is a lot neater.
  • you can find placeholder images for your portfolio, it would show better what it is going to look like https://www.placehold.it/
  • A little more styling on the form would be good - check the bootstrap form classes.
    Off to a good start, though - good luck with that!
Adish Jain
@Adishjain58
Jul 19 2017 13:13
thnx @khaduch
CamperBot
@camperbot
Jul 19 2017 13:13
adishjain58 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3119 | @khaduch |http://www.freecodecamp.com/khaduch
just1witness
@just1witness
Jul 19 2017 13:14
@Adishjain58 very nice :)
Adish Jain
@Adishjain58
Jul 19 2017 13:14
isn't div class="col-xs-6 col-md-6" commands are used to make the content responsive??
thnx @just1witness
CamperBot
@camperbot
Jul 19 2017 13:15
adishjain58 sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
:cookie: 262 | @just1witness |http://www.freecodecamp.com/just1witness
Adish Jain
@Adishjain58
Jul 19 2017 13:16
anyone who can give answer to my question
isn't div class="col-xs-6 col-md-6" commands are used to make the content responsive??
Stephen James
@sjames1958gm
Jul 19 2017 13:22
@just1witness Looks like it is working
Other than an error that current is not defined.
Adish Jain
@Adishjain58
Jul 19 2017 13:22
i don't understand the view the upper link is showing is different than what is shown originally on website??
just1witness
@just1witness
Jul 19 2017 13:23
@sjames1958gm It's supposed to change the style, which should change the css image based on the forcast, the image always stays the same, no matter what the forcast is.
Oh, I forgot to change that, let me check
Stephen James
@sjames1958gm
Jul 19 2017 13:23
For me the forcast is cloudy so it isn't changed.
Adish Jain
@Adishjain58
Jul 19 2017 13:24
isn't div class="col-xs-6 col-md-6" commands are used to make the content responsive??
anyone who can give any advice??
just1witness
@just1witness
Jul 19 2017 13:24
if you change the camparison term you can test it, for example put if text contains Cloudy, change style to "sunny", it doesn't work... :(
@sjames1958gm
madhuri soni
@sonimadhuri
Jul 19 2017 13:25
@Adishjain58 col-xs-6 makes the div occupy half of the width of the entire row
Stephen James
@sjames1958gm
Jul 19 2017 13:26
@just1witness I changed the text var text = "Rain" instead of from the json and got a big raindrop
Adish Jain
@Adishjain58
Jul 19 2017 13:26
so doesn't it make the content responsive?? @sonimadhuri
madhuri soni
@sonimadhuri
Jul 19 2017 13:26
@Adishjain58 yes it makes it responsive
just1witness
@just1witness
Jul 19 2017 13:27
@sjames1958gm I don't want to change the text variable, that contains the forcast from yahoo. I want to change the css style based on what the text variable contains.
Adish Jain
@Adishjain58
Jul 19 2017 13:27
so this means my pen is responsive?? @sonimadhuri
Stephen James
@sjames1958gm
Jul 19 2017 13:28
@just1witness The forcast I got from yahoo was cloudy, so it wouldn't change, so I set the text to "Rain" just to test the chaning of the styles and it did
Sameer Jain
@SJ50
Jul 19 2017 13:29
Please comment on my Game Of Throne random quote generator https://codepen.io/sj50/pen/Ogqqxr
madhuri soni
@sonimadhuri
Jul 19 2017 13:29
@Adishjain58 well not so responsive
Adish Jain
@Adishjain58
Jul 19 2017 13:29
then how i can make it more responsive?? @sonimadhuri
Ken Haduch
@khaduch
Jul 19 2017 13:29
@Adishjain58 - that is responsive but the navbar has a different way to collapse so that it is a small bar across the top, so that your more important content shows on a small device screen. Look on the bootstrap pages for the navbar template code.
just1witness
@just1witness
Jul 19 2017 13:29
@sjames1958gm My forcast is cloudy too. I changed the last if statement to change the style to partly if the forcast is cloudy and the style doesn't change. It seems like it should work, but it doesn't. Try changing the last if statement to test, you'll see it doesn't respond to the forcast.
Stephen James
@sjames1958gm
Jul 19 2017 13:30
@just1witness I changed the woeid to 487889 just to get a different forcast and got Rain and a raindrop
Adish Jain
@Adishjain58
Jul 19 2017 13:30
but i haven't used navbar @khaduch
just1witness
@just1witness
Jul 19 2017 13:31
@sjames1958gm I have to go to work, but will check this when I come back. I'll thank you ahead of time, because your being so helpful! :)
CamperBot
@camperbot
Jul 19 2017 13:31
just1witness sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8109 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
just1witness
@just1witness
Jul 19 2017 13:31
@sjames1958gm Thank you!!!!!!!
CamperBot
@camperbot
Jul 19 2017 13:31
just1witness sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:warning: just1witness already gave sjames1958gm points
just1witness
@just1witness
Jul 19 2017 13:31
Maybe it's my browser..
Eric Weiss
@eweiss17
Jul 19 2017 13:31
@Adishjain58 why didn't you use navbar?
Adish Jain
@Adishjain58
Jul 19 2017 13:32
@eweiss17 because i didn't know how to use nav bar
i created it using ul
but the buttons work and they take you to the other contents of same page
Ken Haduch
@khaduch
Jul 19 2017 13:32
@Adishjain58 - you could use it, though. It is great for mobile devices, it gives a better UX.
madhuri soni
@sonimadhuri
Jul 19 2017 13:33
Adish Jain
@Adishjain58
Jul 19 2017 13:33
ok @khaduch
why this link @sonimadhuri
this link is to download bootstrap
Eric Weiss
@eweiss17
Jul 19 2017 13:34
If you decided not to use bootstrap at all i'd say fine. but you bootstrapped your entire page, might as well just recreate the navbar in bootstrap
Adish Jain
@Adishjain58
Jul 19 2017 13:35
ok @eweiss17
thnx @eweiss17 @khaduch @sonimadhuri
CamperBot
@camperbot
Jul 19 2017 13:35
adishjain58 sends brownie points to @eweiss17 and @khaduch and @sonimadhuri :sparkles: :thumbsup: :sparkles:
:warning: adishjain58 already gave khaduch points
:cookie: 329 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
:cookie: 542 | @eweiss17 |http://www.freecodecamp.com/eweiss17
madhuri soni
@sonimadhuri
Jul 19 2017 13:36
@Adishjain58 nah go through the components section there you will find about the navbar there
Adish Jain
@Adishjain58
Jul 19 2017 13:38
@sonimadhuri i will go through it
anyone who can tell me how i can make my page mobile responsive as it is working fine in my pc but not in phone or tablet
@Adishjain58 and make sure the width and height of the images are not static, you either change them with media queries, or use %
Adish Jain
@Adishjain58
Jul 19 2017 13:46
in phone portfolio content and contact content are collapsing with each other
Victor Popescu
@VicPopescu
Jul 19 2017 13:47
@Adishjain58 i see you use bootstrap, well don't just col-xs-6 col-sm-6 col-md-6 col-lg-6 because thats a static display
Adish Jain
@Adishjain58
Jul 19 2017 13:47
then what to use @VicPopescu
Victor Popescu
@VicPopescu
Jul 19 2017 13:47
@Adishjain58 col-xs-12 col-sm-6 col-md-6 col-lg-6
@Adishjain58 display it on 12 columns on a small and extra small device
@Adishjain58 that means a single item per row
Adish Jain
@Adishjain58
Jul 19 2017 13:48
what is the differnce?? @VicPopescu
Victor Popescu
@VicPopescu
Jul 19 2017 13:48
@Adishjain58 the same thing for your images, change xs-6 and sm-6 to 12
@Adishjain58 do you understand how bootstrap grid works?
Adish Jain
@Adishjain58
Jul 19 2017 13:49
not sure about that @VicPopescu
Victor Popescu
@VicPopescu
Jul 19 2017 13:50
@Adishjain58 col-xs-12 col-sm-12 col-md-6 col-lg-6 means "display this item alone on a line if the device is small or extra small, and take half of the space and allow other item of the same size or smaller near, if the display is bigger"
@Adishjain58 the bootstrap grid will break the section into 12 invisible columns. if you say xs-12 you tell bootstrap to display that section on all rows, and not allow anything else on the same row
Adish Jain
@Adishjain58
Jul 19 2017 13:52
i wanted to show two items in a line that's why i used col-xs-6 and col-sm-6 @VicPopescu
Victor Popescu
@VicPopescu
Jul 19 2017 13:52
@Adishjain58 both items need to toke 6 columns, if you want both on the same row
@Adishjain58 and 12 columns if you want a single item per row
Adish Jain
@Adishjain58
Jul 19 2017 13:53
i wanted items to take 6 columns but in mobile they are collapsing with each other @VicPopescu
Victor Popescu
@VicPopescu
Jul 19 2017 13:53
@Adishjain58 the xs, sm, md, and lg are the targeted screens col-lg-6 translate to "display this item on 6 columns if the screen is large"
@Adishjain58 use the sm and xs classes for mobile
@Adishjain58 and make sure both items have those classes and the number of columns set
Adish Jain
@Adishjain58
Jul 19 2017 13:54
@VicPopescu i have used them but they are collapsing with each other in phone and tablet
@VicPopescu check my code
Victor Popescu
@VicPopescu
Jul 19 2017 13:56
actually I see them switching to different line @Adishjain58
Adish Jain
@Adishjain58
Jul 19 2017 13:56
because i have changed the col-xs and col-sm to 12 @VicPopescu
Victor Popescu
@VicPopescu
Jul 19 2017 13:56
@Adishjain58 well this wasn't what you wanted?
Adish Jain
@Adishjain58
Jul 19 2017 13:57
i wanted them side by side
@VicPopescu
Victor Popescu
@VicPopescu
Jul 19 2017 13:57
@Adishjain58 well how you want that on a small device, if they don't fit
Adish Jain
@Adishjain58
Jul 19 2017 13:57
@VicPopescu what do you mean??
Victor Popescu
@VicPopescu
Jul 19 2017 13:58
@Adishjain58 on a small device those sections take too much space to fit on the screen
Bilal Mahmood Malik
@BilalMalik10
Jul 19 2017 13:58
@Adishjain58 use img-responsive bootstrap class in image tag (The placeholders) .
Victor Popescu
@VicPopescu
Jul 19 2017 13:58
@Adishjain58 if you use 6 columns on small devices too, then those will collapse because the scren can't display both
Adish Jain
@Adishjain58
Jul 19 2017 13:59
@VicPopescu i thought that we can fit everything if we change them to use 6 columns
Victor Popescu
@VicPopescu
Jul 19 2017 13:59
@Adishjain58 you can give % width to those 2 sections, if you want them to auto width on small device, but that will make the section smaller
Adish Jain
@Adishjain58
Jul 19 2017 13:59
@VicPopescu how to do that??
Victor Popescu
@VicPopescu
Jul 19 2017 14:01
@Adishjain58 give the inputs from the form width: 100%
Adish Jain
@Adishjain58
Jul 19 2017 14:01
thnx @VicPopescu
CamperBot
@camperbot
Jul 19 2017 14:01
adishjain58 sends brownie points to @vicpopescu :sparkles: :thumbsup: :sparkles:
:cookie: 504 | @vicpopescu |http://www.freecodecamp.com/vicpopescu
Victor Popescu
@VicPopescu
Jul 19 2017 14:01
@Adishjain58 so that the inputs will get smaller if the screen is smaller
@Adishjain58 and leave those on 6 columns
@Adishjain58 and make sure the form has width 100% too
Adish Jain
@Adishjain58
Jul 19 2017 14:02
give width:100% to those elements which are collapsing??
or to all??
Victor Popescu
@VicPopescu
Jul 19 2017 14:03
@Adishjain58 well you want them side by side on mobile. so you make sure both containers are 50% width so they fit, or 6 columns on bootstrap
Joshua
@Loo15
Jul 19 2017 14:03
Having troubles RGB. I don't understand what I'm doing wrong here.
Victor Popescu
@VicPopescu
Jul 19 2017 14:03
then the form need to be 100% width, so it will expand and collapse with his parent
Joshua
@Loo15
Jul 19 2017 14:03
Capture.PNG
Victor Popescu
@VicPopescu
Jul 19 2017 14:04
@Adishjain58 then the inputs need to be 100% width too, so they will expand and colapse with the form
@Adishjain58 but make sure you provide a max-width for the inputs too, because otherwise they will expand too much on large screens
Ken Haduch
@khaduch
Jul 19 2017 14:05
@Loo15 - it could be as simple as putting semicolons on the end of each rgb line? Try that and see... not sure what they actually check for to determine correctness.
Joshua
@Loo15
Jul 19 2017 14:06
@khaduch Good call. That was the only problem. Thank you.
CamperBot
@camperbot
Jul 19 2017 14:06
loo15 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3120 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Jul 19 2017 14:07
@Loo15 - great! You're welcome. Everything looked find except for that. Good that it worked out... :)
Alexandar B
@ace1122sp
Jul 19 2017 14:07
hey people.. quick question: for npm installs on Windows, we use Node.js command prompt rather than regular command prompt, right? I mean is there any difference between those two?
Ken Haduch
@khaduch
Jul 19 2017 14:10
@ace1122sp - I haven't worked with Node on windows for a while, but I would say that if they have a specific command interpreter / prompt then you should use it for Node-related commands, since they probably have implemented specific functionality and commands that might not be available in the normal windows command prompt.
Alexandar B
@ace1122sp
Jul 19 2017 14:11
@khaduch ok, thanks :D
CamperBot
@camperbot
Jul 19 2017 14:11
ace1122sp sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3121 | @khaduch |http://www.freecodecamp.com/khaduch
Victor Popescu
@VicPopescu
Jul 19 2017 14:15
@ace1122sp you can use the regular command prompt
Eric Weiss
@eweiss17
Jul 19 2017 14:16
ya i'v used either for npm
Victor Popescu
@VicPopescu
Jul 19 2017 14:17
@ace1122sp obvious, if node/npm is added to global environment variable in windows
or if you open the command prompt in the specific repository that has them
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:18
or if you use git bash
Alexandar B
@ace1122sp
Jul 19 2017 14:19
@VicPopescu aha, ok, i see..
:+1: ty
CamperBot
@camperbot
Jul 19 2017 14:19
ace1122sp sends brownie points to @vicpopescu :sparkles: :thumbsup: :sparkles:
:cookie: 506 | @vicpopescu |http://www.freecodecamp.com/vicpopescu
May Kittens Devour Your Soul
@diomed
Jul 19 2017 14:20
use git -smash
Victor Popescu
@VicPopescu
Jul 19 2017 14:22
git -do my project and fetch me a beer
that's the best way to do it
May Kittens Devour Your Soul
@diomed
Jul 19 2017 14:25
u'll have to use sudo for that :yum:
Alexandar B
@ace1122sp
Jul 19 2017 14:26
i'm not yet familiar with git... just starting data vizualization part on fcc... and I've installed react and now I need to install markdown parser&compiler...they suggested to install node.js first... what do you think, maybe I should first learn git and then proceed with the rest?
Victor Popescu
@VicPopescu
Jul 19 2017 14:28
@ace1122sp you can do both, git it is very simple (when you get it)
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:28
@ace1122sp I personally use the github application to do everything
I haven't written a git command in the terminal in ages
Victor Popescu
@VicPopescu
Jul 19 2017 14:28
sudo su WHERE IS MY BEER
Eric Weiss
@eweiss17
Jul 19 2017 14:29
all u gotta know is pull, add, commit, push
Victor Popescu
@VicPopescu
Jul 19 2017 14:29
@ace1122sp there is GUI version of git, for windows too. but you should learn those few bash commands too
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:30
exactly that's all
Teacups Ragnarock
@teacupsragnarok
Jul 19 2017 14:30
Afternoon any one free to troubleshoot a css issue. i have been totally stumped for hours.
Victor Popescu
@VicPopescu
Jul 19 2017 14:30
@eweiss17 you forgot clone
Alexandar B
@ace1122sp
Jul 19 2017 14:31
ok, i see.. then, I'll definitely start with the git and after that i will continue with the other stuff...ty guys :D
@VicPopescu @eweiss17 @ahmedtarek2134
Victor Popescu
@VicPopescu
Jul 19 2017 14:31
@teacupsragnarok we are all free, free of duty, free of money...
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:31
@diomed cough cough
Victor Popescu
@VicPopescu
Jul 19 2017 14:32
@ace1122sp np good luck!
Eric Weiss
@eweiss17
Jul 19 2017 14:32
i was gonna put clone.....
Alexandar B
@ace1122sp
Jul 19 2017 14:32
:+1:
@VicPopescu @eweiss17 @ahmedtarek2134 @diomed thanks... :D i hope, this is a proper thanknote :D
CamperBot
@camperbot
Jul 19 2017 14:33
ace1122sp sends brownie points to @vicpopescu and @eweiss17 and @ahmedtarek2134 and @diomed :sparkles: :thumbsup: :sparkles:
:warning: ace1122sp already gave vicpopescu points
:star2: 5177 | @diomed |http://www.freecodecamp.com/diomed
:cookie: 576 | @ahmedtarek2134 |http://www.freecodecamp.com/ahmedtarek2134
:cookie: 543 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Victor Popescu
@VicPopescu
Jul 19 2017 14:33
weeeeee, i can eat something today ...virtually
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:33
yummy
thx for feeding us
Victor Popescu
@VicPopescu
Jul 19 2017 14:34
I think diomed should go on a diet tho...
Alexandar B
@ace1122sp
Jul 19 2017 14:34
and there is a bonus for your kindness :beers: :beers:
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:34
he can open a shop
Teacups Ragnarock
@teacupsragnarok
Jul 19 2017 14:35
@VicPopescu pm'd
Momozor
@momozor
Jul 19 2017 14:36
hi
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:36
khelo
Eric Weiss
@eweiss17
Jul 19 2017 14:38
shouldn't you be working? @ahmedtarek2134
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:39
I never work
I code when I want to
and I did finish and publish the project already
Eric Weiss
@eweiss17
Jul 19 2017 14:39
where is your summer job
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:39
waaaaa
I don't need to
Eric Weiss
@eweiss17
Jul 19 2017 14:40
u got paid for those projects you did?
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:40
nope
I am still 16 bruh....I can't work now
Momozor
@momozor
Jul 19 2017 14:46
Surely @ahmedtarek2134 is good at CSS and front end components design. :+1:
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:47
how did u know ? :yum:
Jan Shah
@JanShah
Jul 19 2017 14:47
has anyone done this part of fcc? Save your Code Revisions Forever with Git
Momozor
@momozor
Jul 19 2017 14:47
well, based on your Github made projects? Not sure 100% though.
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:49
well yah I do
althought I don't have that much time left
I have 10 minutes and I will need to go
what's up?
Darren
@DarrenfJ
Jul 19 2017 14:53
morning fCC
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:53
@DarrenfJ hey!
Darren
@DarrenfJ
Jul 19 2017 14:53
@CentropyIT the nodeschool one? Did it a while ago when it was easy to do in Cloud9
Momozor
@momozor
Jul 19 2017 14:53
morning
Darren
@DarrenfJ
Jul 19 2017 14:54
hey :D
hi faraco :D
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:54
@DarrenfJ how's it going?
Momozor
@momozor
Jul 19 2017 14:54
:wave:
Darren
@DarrenfJ
Jul 19 2017 14:54
good, busy, good.. the usual ;)
you?
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:54
I was busy but since yesterday I am free
finished a new project
its like an npm init package but with a lot more cool stuff
Huỳnh Trần Khanh
@khanh2003
Jul 19 2017 14:55
@ahmedtarek2134 where is it?
btw, do you use linux?
Darren
@DarrenfJ
Jul 19 2017 14:55
cool :thumbsup:
Jan Shah
@JanShah
Jul 19 2017 14:55
@DarrenfJ thats the one
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:55
@khanh2003 where is what? I use mac
Huỳnh Trần Khanh
@khanh2003
Jul 19 2017 14:55

i use mac too.
i mean where is

a new project

Darren
@DarrenfJ
Jul 19 2017 14:55
@CentropyIT yah it's just using git through a bunch of exercises.. i remember finding it pretty clear..
Ahmed Tarek
@ahmedtarek2134
Jul 19 2017 14:55
github
its called Initior
Darren
@DarrenfJ
Jul 19 2017 14:56
@CentropyIT you on it now?
mind you it was a while ago
Jan Shah
@JanShah
Jul 19 2017 14:56
I'm going to start it later on whilst I'm doing other parts of the course that are slow progress
@DarrenfJ can I do it without cloud9?
I was going to, better suggestion is to skip it but there's a lot of demand for git in cv's
Huỳnh Trần Khanh
@khanh2003
Jul 19 2017 14:57
@CentropyIT yes, you can do it without cloud9
Darren
@DarrenfJ
Jul 19 2017 14:59
@CentropyIT yes
you just have to do everything locally or in another online service that allows you do node stuff
Momozor
@momozor
Jul 19 2017 15:00
This is what people use git for usually - https://try.github.io/levels/1/challenges/1
Darren
@DarrenfJ
Jul 19 2017 15:01
it's the same as all the nodeschool exercises.. you run them and they give you instructions and you run another part of it to confirm you did the exercise right...
Jan Shah
@JanShah
Jul 19 2017 15:01
I've got git installed on my machine, presumably I can just use something like that with my editor?
@DarrenfJ @khanh2003
Darren
@DarrenfJ
Jul 19 2017 15:01
i would argue what @faraco says is true... if you do any set of git exercises you will learn the same thing
i liked it through nodeschool cause I like to see how different people teach the same thing (I have a background and certs in adult learning/instructional design yadda yadda)
Jan Shah
@JanShah
Jul 19 2017 15:02
@faraco you that resource looks great, thanks!
CamperBot
@camperbot
Jul 19 2017 15:02
centropyit sends brownie points to @faraco :sparkles: :thumbsup: :sparkles:
:cookie: 371 | @faraco |http://www.freecodecamp.com/faraco
Darren
@DarrenfJ
Jul 19 2017 15:02
I think the actual exercise is one where you do it somewhere then just check off that you did it
Jan Shah
@JanShah
Jul 19 2017 15:03
@DarrenfJ it's not starred so I could skip it... :(
can't though, requirements
Darren
@DarrenfJ
Jul 19 2017 15:05
@CentropyIT the top of this guide (that came out o the fCC forum) has quite a few really great git links: https://github.com/P1xt/p1xt-guides/blob/master/faq.md
Momozor
@momozor
Jul 19 2017 15:06

you can always do it later. Sometimes tools like this only distracts you. I'll learn new stuff when I feel I do need to learn it.

For example, once ago I had to learn to use bzr (similar to git, but much more isolated for linux users) just to push my commits to a project repo on Launchpad.net. You'll learn better once you know why and when you do really need it.

Darren
@DarrenfJ
Jul 19 2017 15:06
@CentropyIT this ones' pretty good too, right to the point: http://gitimmersion.com/index.html
@CentropyIT and I really liked this course although it's more than you need to get started (those 2 links are the last 2 in her list from my faq link) : https://www.udacity.com/course/how-to-use-git-and-github--ud775
how to do this?
Darren
@DarrenfJ
Jul 19 2017 15:09
@kishoremani98 what are you stuck on with it?
kishore
@kishoremani98
Jul 19 2017 15:10
i can't understand the question
Darren
@DarrenfJ
Jul 19 2017 15:10
@kishoremani98 "You will also need to use additional strings, which will not change, and must be in between all of the provided words. The output should be a complete sentence."
@kishoremani98 the noun verb the object (the dog climbed the stairs)
the adjective noun verb adverb the object (the big dog walked quickly up the stairs)
@kishoremani98 they give you part of the sentence (here: function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {...) and want you to use the "string" + variable + "string" + variable ... idea to build a sentence
@CentropyIT you could also check a bunch of other git exercises and when confident 'check off' that it's complete... or run the exercise locally...
@CentropyIT side note: what do they have in the beta as a replacement for that exercise
kishore
@kishoremani98
Jul 19 2017 15:15
@DarrenfJ kk tq
CamperBot
@camperbot
Jul 19 2017 15:15
kishoremani98 sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1917 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Jul 19 2017 15:18
brb gonna go check the beta
Benjamin Chapman
@Reytholian
Jul 19 2017 15:22
@DarrenfJ Destiny 2 beta?
Jan Shah
@JanShah
Jul 19 2017 15:23
@DarrenfJ amazing stuff, thanks for your input bro
CamperBot
@camperbot
Jul 19 2017 15:23
centropyit sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1918 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Jul 19 2017 15:28
@CentropyIT also a whole thread about doingit and setting up locally... plus the forum has many suggestions of different environments to dev locally: https://forum.freecodecamp.org/t/how-to-do-the-save-your-code-revisions-forever-with-git/112268
have fun!
also thank you's and brownies to all the other great volunteers helping out in here..
Momozor
@momozor
Jul 19 2017 15:29
thanks @DarrenfJ
CamperBot
@camperbot
Jul 19 2017 15:29
faraco sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 1919 | @darrenfj |http://www.freecodecamp.com/darrenfj
Darren
@DarrenfJ
Jul 19 2017 15:30
thanks @faraco @khanh2003 @ahmedtarek2134
CamperBot
@camperbot
Jul 19 2017 15:30
darrenfj sends brownie points to @faraco and @khanh2003 and @ahmedtarek2134 :sparkles: :thumbsup: :sparkles:
:cookie: 96 | @khanh2003 |http://www.freecodecamp.com/khanh2003
:cookie: 372 | @faraco |http://www.freecodecamp.com/faraco
:cookie: 577 | @ahmedtarek2134 |http://www.freecodecamp.com/ahmedtarek2134
Darren
@DarrenfJ
Jul 19 2017 15:30
i'm off to test
bipgen
@bipgen
Jul 19 2017 15:46
Hi how to check if an element is. Visible or not in screen using jquery
I mean in the viewport
Gulsvi
@gulsvi
Jul 19 2017 16:32
@bipgen use $(element).is(":visible")
Ravi Kishore Thella
@ravikishorethella
Jul 19 2017 16:33
@DarrenfJ :wave:
Sweet Coding :)
@SweetCodingInc
Jul 19 2017 16:37
@bipgen $(el).is(":visible");
knight2
@knight2
Jul 19 2017 16:48
@sjames1958gm thanks a lot! Was looking for a way to add it externally. That works
CamperBot
@camperbot
Jul 19 2017 16:48
knight2 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8112 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Kristi Nushi
@Kristi92
Jul 19 2017 16:48
@eweiss17 can you help me with an issue
?
please?
John Tendik
@JohnTendik
Jul 19 2017 16:49
whats the issue?
Kristi Nushi
@Kristi92
Jul 19 2017 16:49

`var string = "Split me into an array";
var array = [];

// Only change code below this line.

var strSplit = "Split me into an array".split(" ");`

i don't know where the prob is
John Tendik
@JohnTendik
Jul 19 2017 16:50
array.split(" ");
so do this
Kristi Nushi
@Kristi92
Jul 19 2017 16:51
i done it like that before
none a thing!
Stephen James
@sjames1958gm
Jul 19 2017 16:51
@Kristi92 string.split(" ")
You split a string into an array.
You join an array into a string.
John Tendik
@JohnTendik
Jul 19 2017 16:51
var string = "Split me into an array";
var array = [];
// Only change code below this line.
var array = string.split("");
ur variable names are horrible, you should never use string and array for varaible names
Kristi Nushi
@Kristi92
Jul 19 2017 16:52
doesn't passes the challenge like this @JohnTendik
@sjames1958gm still nothing
Stephen James
@sjames1958gm
Jul 19 2017 16:53
@Kristi92 array = string.split(' '); this is the line that you add
Kristi Nushi
@Kristi92
Jul 19 2017 16:54
@sjames1958gm thank you
CamperBot
@camperbot
Jul 19 2017 16:54
kristi92 sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8113 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Stephen James
@sjames1958gm
Jul 19 2017 16:54
Use split to create an array of words from string and assign it to array.
the array of words is created by splitting the string on the space character.
@Kristi92 :+1:
GSGV
@GSGV
Jul 19 2017 16:59
Hey guys, did my portfolio page and I'm stumped on a few questions:
1.Why do I have a left/right scroll bar... ugh
2.Why does my bottom navbar have space under it... ugh again
3.Without image hosting can I post a screen shot of my codepens instead of embeding them into the site?
Any other feedback is great!
https://codepen.io/GSGV/pen/jwoRRM
catapulto
@catapulto
Jul 19 2017 16:59
hola guyz
Eric Weiss
@eweiss17
Jul 19 2017 17:02
@GSGV looks like you have some margin-right
add margin-bottom: 0; to #bottom-bar
GSGV
@GSGV
Jul 19 2017 17:04
@eweiss17 I set all my margins to 0 already so that's why I'm confused
@eweiss17 oh i was using "0px" i guess that's not a command
Eric Weiss
@eweiss17
Jul 19 2017 17:07
0px is fine
I believe your navbar is extending past the rest of the page ...
looking into it
for #3. why is image hosting a problem? you can just use a free one
i'll be back in a bit, check out your navbar though
GSGV
@GSGV
Jul 19 2017 17:15
@eweiss17 got the navbar set thanks
as far as image hosting my understanding is you lose ownership of those images as soon as you upload them on free sites
CamperBot
@camperbot
Jul 19 2017 17:15
gsgv sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 544 | @eweiss17 |http://www.freecodecamp.com/eweiss17
madhuri soni
@sonimadhuri
Jul 19 2017 17:15
@GSGV adding overflow-x:hidden; to body hides the horizontal scrolls
Eric Weiss
@eweiss17
Jul 19 2017 17:17
the navbar is the one that is extending more of the width though. i looked through the dev tools and couldn't figure out why @sonimadhuri
GSGV
@GSGV
Jul 19 2017 17:17
@sonimadhuri worked perfect thanks!
CamperBot
@camperbot
Jul 19 2017 17:17
gsgv sends brownie points to @sonimadhuri :sparkles: :thumbsup: :sparkles:
:cookie: 330 | @sonimadhuri |http://www.freecodecamp.com/sonimadhuri
Eric Weiss
@eweiss17
Jul 19 2017 17:18
@GSGV the multiple background images like that is good if you are trying to be an attention grabber.... what is no hot linking?
dhruvjadvani
@dhruvjadvani
Jul 19 2017 17:38
can you please check this code??? is this right or wrong

// Example
var ourArray = ["Stimpson", "J", "cat"];
ourArray.shift(); // ourArray now equals ["J", "cat"]
ourArray.unshift("Happy");
// ourArray now equals ["Happy", "J", "cat"]

// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();

// Only change code below this line.
myArray.unshift(["paul",35]);

GSGV
@GSGV
Jul 19 2017 17:39
@eweiss17 I'm not sure what "no hot linking" is, where do you see that?
Stephen James
@sjames1958gm
Jul 19 2017 17:40
@dhruvjadvani Paul is not paul
@GSGV For me every one of the pixabay images is not showing, instead it is showing text saying no hotlinking.
Which probably means you cannot link directly to their image URLs
dhruvjadvani
@dhruvjadvani
Jul 19 2017 17:42
@sjames1958gm 10x
Stephen James
@sjames1958gm
Jul 19 2017 17:42
@GSGV from Pixabay FAQ
NO HOTLINKING - what does that mean?
If you want to show Pixabay images on your website, please upload them to your server. Pixabay image URLs don't work on external sites.
@dhruvjadvani ?
GSGV
@GSGV
Jul 19 2017 17:45
@sjames1958gm thanks for pointing that out it doesn't show that way on my screen... bleh
Gulsvi
@gulsvi
Jul 19 2017 17:48
@GSGV Try viewing your portfolio in incognito/private mode and you'll see all the "No Hotlinking" images instead of the ones you would expect. For thumbnail images of your codepen projects, you can go to the individual project, click settings, and then click "Screenshot"
image.png
Eric Weiss
@eweiss17
Jul 19 2017 17:52
@SkyC0der are you allowed outside of /helpfrontend?
Gulsvi
@gulsvi
Jul 19 2017 17:56
@eweiss17 Only on weekdays and weekends
GSGV
@GSGV
Jul 19 2017 17:58
@SkyC0der how do i view it in incognito mode? is that in settings?
Gulsvi
@gulsvi
Jul 19 2017 17:59
@GSGV It depends on your browser - It's called private browsing mode in some browsers
(which browser are you using?)
Joseph
@revisualize
Jul 19 2017 17:59
@GSGV Here's the problem you're running into.. https://simple.wikipedia.org/wiki/Hotlinking
What you need to do is download the images you want to use and upload them somewhere else (that allows linking) then link to those images.
@GSGV pixabay.com and imgur and a few other websites don't allow you to link to their images.
GSGV
@GSGV
Jul 19 2017 18:01
@SkyC0der oh i see what you're saying... i need to open my incognito browser in chrome to see it that way gotcha!
Joseph
@revisualize
Jul 19 2017 18:01
@GSGV It uses their bandwidth to display the image and they can't afford that.
Eric Weiss
@eweiss17
Jul 19 2017 18:02
i thought yo uwanted that pixabay lol..... now i feel dumb
GSGV
@GSGV
Jul 19 2017 18:02
@revisualize do you know anyone who does?
i know wikipedia commons but... ew on options
Joseph
@revisualize
Jul 19 2017 18:02
@GSGV I don't.
Eric Weiss
@eweiss17
Jul 19 2017 18:02
unsplash
GSGV
@GSGV
Jul 19 2017 18:02
@eweiss17 sweet thanks
CamperBot
@camperbot
Jul 19 2017 18:02
gsgv sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:warning: gsgv already gave eweiss17 points
Joseph
@revisualize
Jul 19 2017 18:03
@GSGV I have my own webserver hosting ... So, I don't run into this issue.
Eric Weiss
@eweiss17
Jul 19 2017 18:03
what types of pictures do you want?
Gulsvi
@gulsvi
Jul 19 2017 18:03
@GSGV Yeah, incognito doesn't use cached files. Try using https://postimage.io, you can give them the URL of an image and they'll host it for you. Even pixabay images.
GSGV
@GSGV
Jul 19 2017 18:04
@SkyC0der you're awesome thanks a ton
CamperBot
@camperbot
Jul 19 2017 18:04
gsgv sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2152 | @skyc0der |http://www.freecodecamp.com/skyc0der
Eric Weiss
@eweiss17
Jul 19 2017 18:05
pixababy lol
unsplash still has real nice hd images with good resolution.... https://unsplash.com/ I'v used it and it works great
Joseph
@revisualize
Jul 19 2017 18:08
@GSGV I also just host my project website on my github pages url .. so, I don't need to worry about Hotlinking.
GSGV
@GSGV
Jul 19 2017 18:10
@revisualize show me a link so i know what you're talking about?
Uriel Guzmán
@Burinson
Jul 19 2017 18:10
A little help with this challenge? https://www.freecodecamp.org/challenges/mutations
function mutation(arr) {
 var newArr = arr.join(', ').toLowerCase().split(" ");

  for ( var i = 0; i < newArr.length; i++  ) {

 var result = newArr[0].indexOf(newArr[1]) > -1;



  return result;
  }
}

mutation(["hello", "olleh"]);
Eric Weiss
@eweiss17
Jul 19 2017 18:11
you upload the images to your github, then you can just do a preview of the github
GSGV
@GSGV
Jul 19 2017 18:12
@eweiss17 it gave me an error message
Joseph
@revisualize
Jul 19 2017 18:12
Eric Weiss
@eweiss17
Jul 19 2017 18:13
i just use the link i gave to preview my github, what is that page? @revisualize
Joseph
@revisualize
Jul 19 2017 18:14
@eweiss17 Why don't you click the link and watch the video.
Such WOW!
GSGV
@GSGV
Jul 19 2017 18:15
@revisualize that's so smart
@revisualize thanks!
CamperBot
@camperbot
Jul 19 2017 18:15
gsgv sends brownie points to @revisualize :sparkles: :thumbsup: :sparkles:
:star2: 4361 | @revisualize |http://www.freecodecamp.com/revisualize
Eric Weiss
@eweiss17
Jul 19 2017 18:16
did you just mock me?
Aita Kane
@aita-kane
Jul 19 2017 18:17
hello can you guys help me please i want to change the hat et letter to have 3pictures in there but i try evrything and nothing work here is the codepen i found : https://codepen.io/ihatetomatoes/pen/PqoNpy
Joseph
@revisualize
Jul 19 2017 18:17
@eweiss17 yup.
@eweiss17 I hope your feelings aren't hurt.
@eweiss17 The page has a TON of amazing content and information to tell you exactly what it is and what it does.
@eweiss17 It even has instructions that I followed to get everything setup.
Eric Weiss
@eweiss17
Jul 19 2017 18:18
whoah, you wanna have a verbal argument over the internet?
I'm up for it if you are
Joseph
@revisualize
Jul 19 2017 18:18
@eweiss17 Sure. Let's do that. Let me know when you're done.
revisualize @revisualize goes AFK.
Eric Weiss
@eweiss17
Jul 19 2017 18:19
great you went afk, bye
Joseph
@revisualize
Jul 19 2017 18:21
I'm back.
@GSGV Seriously though .. Github pages are awesome.. You can even apply your own custom domain to your github pages and you look more professional.
Eric Weiss
@eweiss17
Jul 19 2017 18:23
Says you only get one per account
I read the page man, real useful information there, check it out @revisualize
GSGV
@GSGV
Jul 19 2017 18:24
@revisualize so just to be sure i'm understanding... what you're saying about gitpages, if you will, is that i can use a hotlink to upload the image there, and then i can use the new url for my projects in codepen?
Joseph
@revisualize
Jul 19 2017 18:25
@GSGV No. You just upload the content and the image to the Github Repo.
It removes the need for Codepen.
@GSGV Github Pages != Codepen
GSGV
@GSGV
Jul 19 2017 18:26
okay i see...
that's cool to know
Joseph
@revisualize
Jul 19 2017 18:27
@GSGV Let me upload an image to mine.
Eric Weiss
@eweiss17
Jul 19 2017 18:28
@GSGV just go with what @SkyC0der said earlier.
@GSGV I guess it is just an alternative option.
Eric Weiss
@eweiss17
Jul 19 2017 18:33
she just wanted a site to host images I believe, learning how to incorporate projects into github is something for another time
Joseph
@revisualize
Jul 19 2017 18:38
Are you assuming gender?
Eric Weiss
@eweiss17
Jul 19 2017 18:39
hey are you an arrogant developer who is insulted when people don't know as much as you do?
or are you just trolling?
Joseph
@revisualize
Jul 19 2017 18:42
@eweiss17 I'm neither. At least I don't think I am.
Lance
@texas2010
Jul 19 2017 18:44
i am going to stop this argument . please stop. i got complain from someone about this drama.
Joseph
@revisualize
Jul 19 2017 18:45
@eweiss17 Look, you think I mocked you because I suggested that you click on a link and read the content / watch a video. I'm sorry that you feel that someone giving you a link and when you don't click on it and take in the content is in your mind classified as mocking. Look, I really do hope your feelings aren't hurt. But, you seem quite sensitive. You then babble on about getting in to an online argument .. What over telling you to watch a video and read the content? ... Come on. That's completely unmerited and unwanted.
@eweiss17 I'm not here to offend or belittle anyone.
@eweiss17 Hence the reason I made the comment.. Sure. Let's do that. Let me know when you're done. .... Then I went AFK right afterwards.
I will not be engaging in an argument online with you or anyone else.
It is 1000% pointless.
Uriel Guzmán
@Burinson
Jul 19 2017 18:48
A little help with this challenge? https://www.freecodecamp.org/challenges/mutations
function mutation(arr) {
 var newArr = arr.join(', ').toLowerCase().split(" ");

  for ( var i = 0; i < newArr.length; i++  ) {

 var result = newArr[0].indexOf(newArr[1]) > -1;



  return result;
  }
}

mutation(["hello", "olleh"]);
Coy Sanders
@coymeetsworld
Jul 19 2017 18:51
theres a few problems that I can see
korzo
@korzo
Jul 19 2017 18:52
@Burinson You have to loverCase both arguments separately.
Lance
@texas2010
Jul 19 2017 18:52
@revisualize please check your pm
Coy Sanders
@coymeetsworld
Jul 19 2017 18:52
first is you don't need to join both strings together
second, you're not using i anywhere in your for loop, its hard casting 0 and 1
third, this check wont validate the frequency of the letters in each string
Stephen James
@sjames1958gm
Jul 19 2017 18:53
@Burinson You have to check each character of arr[1] in arr[0] not just the entire string
Uriel Guzmán
@Burinson
Jul 19 2017 18:57
@korzo should I create 2 arrays?
korzo
@korzo
Jul 19 2017 18:58
@Burinson You don't need arrays. Just lowercase both elements in array
arr[0] = arr[0].toLowerCase();
and the same with arr[1]
thanks for the help everyone, now you can see what i see
korzo
@korzo
Jul 19 2017 18:59
@Burinson Then iterate over arr[1] and check, if all characters are in arr[0]
Uriel Guzmán
@Burinson
Jul 19 2017 19:00
arr[0].toLowerCase is not a function
korzo
@korzo
Jul 19 2017 19:02
@Burinson Post your current code
Uriel Guzmán
@Burinson
Jul 19 2017 19:03
function mutation(arr) {
 var newArr = arr[0].toLowercase();






  return newArr;

}

mutation(["hello", "olleh"]);
korzo
@korzo
Jul 19 2017 19:03
Case @Burinson
Uriel Guzmán
@Burinson
Jul 19 2017 19:03
Oh, mispelled
@korzo thanks
CamperBot
@camperbot
Jul 19 2017 19:03
burinson sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 273 | @korzo |http://www.freecodecamp.com/korzo
korzo
@korzo
Jul 19 2017 19:04
@Burinson Yeah, I made a typo. Sorry
Uriel Guzmán
@Burinson
Jul 19 2017 19:04
@korzo Yours is correct
I made the typo
Stephen James
@sjames1958gm
Jul 19 2017 19:07
@Burinson newArr is not a good name for a string. Naming variables accurately makes code easier to reason about
korzo
@korzo
Jul 19 2017 19:08
@Burinson I edited my post moment after I hit enter.
But rule of thumb is that all build-in javascript methods are camelCased
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:11
I'm working on Steamroller challenge, under Intermediate Algorithm Scripting, and there is an unresponsive script on the page, so I can no longer edit my program. This is true even after restarting the browser. I've used a recursive call, so I'm sure I've made a mistake, but the only way I seem to be able to get back to editing is if I clear my cache and copy my code in again.
otherwise the page loads with my program, but I get "this page has become unresponsive" over and over, without trying to run my program again.
Gulsvi
@gulsvi
Jul 19 2017 19:13
@jp-sauve You can add run=disabled to your URL as shown here: https://forum.freecodecamp.org/t/disable-code-auto-run-on-free-code-camp/19511
Uriel Guzmán
@Burinson
Jul 19 2017 19:13

@korzo

function mutation(arr) {
 var firstArrayLowerCase = arr[0].toLowerCase();
  var secondArrayLowerCase = arr[1].toLowerCase();






  return secondArrayLowerCase;

}

mutation(["hello", "olLeH"]);

like this?

Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:13
function steamrollArray(arr,myArr) {
  "use strict";
  var newArr = [];
  if (Array.isArray(myArr)) {
    newArr = myArr;
  } else {
    console.log("No incoming myArr!");
  }
  while ((arr.length>0)) {
    if (Array.isArray(arr[0])) {
      newArr = steamrollArray(arr[0],newArr);
    } else {
      newArr.push(arr.shift());
    }

  }
  return newArr;
}
Uriel Guzmán
@Burinson
Jul 19 2017 19:14
@sjames1958gm oh, thanks, hadn't thought of that
CamperBot
@camperbot
Jul 19 2017 19:14
burinson sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8114 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:14
when I limit it with a counter, it looks to be working, so I don't get why it's an infinite loop
Stephen James
@sjames1958gm
Jul 19 2017 19:14
@Burinson You're welcome
korzo
@korzo
Jul 19 2017 19:15
@Burinson Yes, but you can assign it to the same variable like arr[0] = arr[0].toLowerCase
Uriel Guzmán
@Burinson
Jul 19 2017 19:16
@korzo in what syntax?
Stephen James
@sjames1958gm
Jul 19 2017 19:16
@jp-sauve If the first value of the array is an array your while loop never checks anything but arr[0]
so length doesn't change
Uriel Guzmán
@Burinson
Jul 19 2017 19:16
arr[0][1]?
Like that?
korzo
@korzo
Jul 19 2017 19:18
@Burinson Don't want to confuse you. Your code is ok.
Now iterate over secondArrayLowerCase and check, if all letters are in firstArrayLowerCase
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:20
@sjames1958gm I don't see what you mean. if the first value is an array, the function is called again recursively.
and that array is passed in as the new array to be steamrolled. and checking starts at [0] again
Stephen James
@sjames1958gm
Jul 19 2017 19:22
@jp-sauve But when that recursive call returns, you are still processing arr and arr.length hasn't changed.
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:22
ooh...
Uriel Guzmán
@Burinson
Jul 19 2017 19:26
@korzo
function mutation(arr) {
 var firstArrayLowerCase = arr[0].toLowerCase().split("");
  var secondArrayLowerCase = arr[1].toLowerCase().split("");

 for (var i=0; i < arr.length; i++) {
 var result = firstArrayLowerCase[i].indexOf(secondArrayLowerCase[i]);



  return result;
 }
}

mutation(["hello", "hello"]);
korzo
@korzo
Jul 19 2017 19:27
@Burinson Why arr.length ?
You have to check all letters from secondArrayLowerCase
@Burinson Also why firstArrayLowerCase[i].indexOf ?
You want to check whole firstArrayLowerCase string
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:29
@sjames1958gm thanks! I'm happy that I was otherwise doing it right, aside from the missing shift
CamperBot
@camperbot
Jul 19 2017 19:29
jp-sauve sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8115 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
Uriel Guzmán
@Burinson
Jul 19 2017 19:30
@korzo I don't completely understand for loops yet
korzo
@korzo
Jul 19 2017 19:32
@SkyC0der ty . I ended up modifying local storage :)
CamperBot
@camperbot
Jul 19 2017 19:32
korzo sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2154 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jul 19 2017 19:34
lol @korzo That works too :)
korzo
@korzo
Jul 19 2017 19:34
@Burinson You can access string as array. secondArrayLowerCase[0] is first letter.
You need iterate secondArrayLowerCase from 0 to secondArrayLowerCase.length - 1
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:35
@Burinson for loops are generally like this. for (<variableInit>;<checkTruth>;<doSomething>) {
Uriel Guzmán
@Burinson
Jul 19 2017 19:36
@jp-sauve I know what they mean, but don't know how to apply it, for example, I don't know what checkTruth even means
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:38
It's when one variable is compared to another, or to a value. if you set i=0 in the first part, and you want to loop 10 times, then a check for truth could be i<=10 which means the loop will run while i is less than or == 10. the <doSomething> bit happens after everything else in the loop runs (when truth is found) and generally will do something like i++ which adds one to i, before restarting the loop.
<,>,<=,>=,==,===, and the negated versions using ! will all return a boolean (true or false) value
the for loop repeats when your boolean expression evaluates to true
That would look like this:
for (i=0 ; i <=10 ; i++) {
  console.log("i = " + i );
}
that should print "i = 0 ... i = 10"
Jean-Paul Sauve
@jp-sauve
Jul 19 2017 19:43
sorry. they're called relational operators, and return boolean values.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators
aRtoo
@artoodeeto
Jul 19 2017 19:45

broosss why is it the animate function doesnt work here and addClass is working

  /*addClass working. animate() not working
  $('input').addClass('animated fadeIn', function() {
    $('input').animate({
        bottom: 200
        //console.log('success');
     },1000)
  });*/

and here the animation() functon is working but the fadein is not working. any idea?? have u experience this?

  /* fadeIn not working. animate() working
  $('input').fadeIn(1000,function(){
    $('input').animate({
      bottom: 200
    }, 1000)
  })
  */
Uriel Guzmán
@Burinson
Jul 19 2017 19:50
@jp-sauve Okay, thanks, I undertsand more now
@jp-sauve The other thing I don't understand is when to apply the index [i]
korzo
@korzo
Jul 19 2017 19:58
@Burinson When you want to access element/character/property at given index
@Burinson For eaxample, if you want to print every character of string
var str = 'FreeCodeCamp';
for(var i = 0; i < str.length; i++) {
    console.log(str[i]);
}
Uriel Guzmán
@Burinson
Jul 19 2017 20:07
Okay, I definetaly understnd better

Now I need to know why

function mutation(arr) {
 var firstArray = arr[0].toLowerCase().split("");
  var secondArray = arr[1].toLowerCase().split("");

 for (var i=0; i <= firstArray.length; i++) {
 var result = firstArray.indexOf(secondArray[i]) > -1;



  return result;
 }
}

mutation(["hello", "hey"]);

mutation(["hello", "hey"]); turns out true but mutation(["hello", "neo"]) returns false.

Both of them should be false
korzo
@korzo
Jul 19 2017 20:17
@Burinson The assignment is clear. If any character from secondArray isn't in firstArray , return false.
Otherwise return true
Uriel Guzmán
@Burinson
Jul 19 2017 20:18
image.png
@korzo For some reason, the first challenge doesn't pass
korzo
@korzo
Jul 19 2017 20:18
@Burinson Because tests are wrong :)
Manish Giri
@Manish-Giri
Jul 19 2017 20:19
@Burinson return is inside the for loop
Uriel Guzmán
@Burinson
Jul 19 2017 20:19
@korzo Huh?
korzo
@korzo
Jul 19 2017 20:19
@Burinson Your loop run only once (first character) and then return
Uriel Guzmán
@Burinson
Jul 19 2017 20:19
@Manish-Giri If I put it outside, it says "out of scope"
Manish Giri
@Manish-Giri
Jul 19 2017 20:20
because you put var result inside the for loop
korzo
@korzo
Jul 19 2017 20:20
@Burinson Outside the loop, not function
Manish Giri
@Manish-Giri
Jul 19 2017 20:20
that limits the scope of the variable to inside the loop only
@Burinson
declare var result outside the loop
srpalomino
@srpalomino
Jul 19 2017 20:22
Hey guys!
Does anyone know passportjs? I have a nasty problem
Sydney
@SydneyWarren
Jul 19 2017 20:24
can someone look over my code and see if there is a better way of writing it
i've written over 200 lines of code for this challenge i dont wanna spam the page, how should i post it?
korzo
@korzo
Jul 19 2017 20:25
@SydneyWarren codepen/jsbin/repl.it
May Kittens Devour Your Soul
@diomed
Jul 19 2017 20:26
hello @Manish-Giri :cat:
Gaurav
@gauravmagan
Jul 19 2017 20:26
hi cannot access my bundle.js
Pethaf
@Pethaf
Jul 19 2017 20:26
@SydneyWarren You can use codepen or gist.github.com
Gaurav
@gauravmagan
Jul 19 2017 20:27
Screen Shot 2017-07-19 at 4.26.09 PM.png
cannot access my bundle.js
Screen Shot 2017-07-19 at 4.27.38 PM.png
Manish Giri
@Manish-Giri
Jul 19 2017 20:28
@diomed :cat:
where've you been
Gaurav
@gauravmagan
Jul 19 2017 20:28
@SydneyWarren can you please look into
Sydney
@SydneyWarren
Jul 19 2017 20:28
here's my code, can someoneone tell me if there's a bettwe way to write it?
Manish Giri
@Manish-Giri
Jul 19 2017 20:29
@gauravmagan your directory structure is wrong
Uriel Guzmán
@Burinson
Jul 19 2017 20:30
@Manish-Giri
function mutation(arr) {

 var firstArray = arr[0].toLowerCase().split("");
  var secondArray = arr[1].toLowerCase().split("");
  var result = '';

 for (var i=0; i < firstArray.length; i++) {
 result = firstArray.indexOf(secondArray[i]) > -1; 
 }
  return result;
}

mutation(["hello", "ey"]);
May Kittens Devour Your Soul
@diomed
Jul 19 2017 20:31
@Manish-Giri oh, u know... taken other ventures since this is all js now
Manish Giri
@Manish-Giri
Jul 19 2017 20:33
lol
what ventures?
and it's not all js..there are html/css qs too
May Kittens Devour Your Soul
@diomed
Jul 19 2017 20:36
nothing I'm good with
korzo
@korzo
Jul 19 2017 20:36
@SydneyWarren
What if number has more then 3 digits?
Also you return nothing.
Sydney
@SydneyWarren
Jul 19 2017 20:37
i'm gonna code that next
that part is easy but i was wondering if i had the best approach to this
Uriel Guzmán
@Burinson
Jul 19 2017 20:37
How can I initialize var result = '';? It's supposed to return a boolean...
korzo
@korzo
Jul 19 2017 20:38
@SydneyWarren No, it's not the best approach.
you can do it in the loop and cut number of lines 3 fold
Manish Giri
@Manish-Giri
Jul 19 2017 20:39
@Burinson you can overwrite a variable from a string type to a boolean type
that's not the problem here
Sydney
@SydneyWarren
Jul 19 2017 20:39
@korzo is there an example i can look at somewhere?
Uriel Guzmán
@Burinson
Jul 19 2017 20:40
Wtf
Manish Giri
@Manish-Giri
Jul 19 2017 20:40
the problem is in your loop
result = firstArray.indexOf(secondArray[i]) > -1;
May Kittens Devour Your Soul
@diomed
Jul 19 2017 20:40
@Manish-Giri x
Manish Giri
@Manish-Giri
Jul 19 2017 20:40
this will always hold the result of the last comparison only
Albert Cardona II
@daddycardona
Jul 19 2017 20:40
question for you salty people
Manish Giri
@Manish-Giri
Jul 19 2017 20:41
@diomed did u see the episode?
Joseph
@revisualize
Jul 19 2017 20:41
@SydneyWarren That's a lot of code for that challenge.
May Kittens Devour Your Soul
@diomed
Jul 19 2017 20:41
of course I saw the episode. I'm not a peasant
Sydney
@SydneyWarren
Jul 19 2017 20:41
@revisualize i know, how could i have one it differently
Albert Cardona II
@daddycardona
Jul 19 2017 20:41
how come this line is not working if(str.charCodeAt(i) > 64)
Uriel Guzmán
@Burinson
Jul 19 2017 20:41
@Manish-Giri why?
Joseph
@revisualize
Jul 19 2017 20:42
@SydneyWarren Well, num is a number.
korzo
@korzo
Jul 19 2017 20:42
@SydneyWarren I have little bit hackish solution, but I'm sure there is solution in forum.
But you have to start from biggest number and subtract in loop
Manish Giri
@Manish-Giri
Jul 19 2017 20:42
@Burinson you say..what do you think is happening in the loop
Joseph
@revisualize
Jul 19 2017 20:42
@SydneyWarren I'd do math downward to 0
@SydneyWarren I think you'd want to use a different data structure.
Uriel Guzmán
@Burinson
Jul 19 2017 20:43
@Manish-Giri I'm so confused because when the var was incorrectly placed inside the loop all but one of the hints turned green
Joseph
@revisualize
Jul 19 2017 20:44
@SydneyWarren And loop downward based upon the value of num
Uriel Guzmán
@Burinson
Jul 19 2017 20:44
Then, when I placed it outside, half of them failed
Manish Giri
@Manish-Giri
Jul 19 2017 20:44
you shouldn't change your code based on how many tests are passing/not passing
you focus on writing the correct code, the tests will pass automatically
Joseph
@revisualize
Jul 19 2017 20:45
@SydneyWarren And seeing as your largest number for Roman is 1000 ... if the num is larger than 1000. Reset your loop
Sydney
@SydneyWarren
Jul 19 2017 20:46
how would i loop?
John Tendik
@JohnTendik
Jul 19 2017 20:46
for(var i = 0; i < 10; i++{
  // loop 10 times
}
korzo
@korzo
Jul 19 2017 20:47
@JohnTendik @SydneyWarren No. You need while() loop
look at the console logs
this will always hold the result of the last comparison only
and see what I said here
Uriel Guzmán
@Burinson
Jul 19 2017 20:47
`result = firstArray.indexOf(secondArray[i]) > -1; It's checking if the first letter of secondArray exists in firstArray, if it returns a value greater than -1, it will loop again, until it reached firstArray.length and then will return true or false. I am obviously wrong
John Tendik
@JohnTendik
Jul 19 2017 20:48
var i = 0;
while(i < 1000){
  // loop 1000 times
}
Uriel Guzmán
@Burinson
Jul 19 2017 20:49
@Manish-Giri So, in other words, it's just checking if the first letter exists?
korzo
@korzo
Jul 19 2017 20:49

@SydneyWarren

while(num > 0) {
 //your code here
}

and in the loop subtract from num as @revisualize wrote

May Kittens Devour Your Soul
@diomed
Jul 19 2017 21:06
@Manish-Giri no more python troubles https://github.com/drathier/stack-overflow-import
Gaurav
@gauravmagan
Jul 19 2017 21:09
Screen Shot 2017-07-19 at 5.09.21 PM.png
is there anything problem
hi i have changed the folder name as well
but its still pertaining
May Kittens Devour Your Soul
@diomed
Jul 19 2017 21:11
wut iz ract
Albert Cardona II
@daddycardona
Jul 19 2017 21:11
Okay can someone help me with my code it converts the letters correctly but does not convert spaces etc.. correctly. It should not touch the spaces, periods etc..
function rot13(str) { // LBH QVQ VG!

var oldChar;
var newChar;
var abc ="";
var i;
  for(i in str){

    if(str.charCodeAt(i) > 64 ) {
      oldChar = str.charCodeAt(i);
      newChar = oldChar + 13;

    }else
    {
      newChar = oldChar;
    }
    if(newChar>90){
      newChar = newChar-26;
    }
    abc= abc.concat(String.fromCharCode(newChar));



  }
 return abc;

}

// Change the inputs below to test
rot13("GUR DHVPX OEBJA QBT WHZCRQ BIRE GUR YNML SBK.");
how ever it keeps converting the spaces and periods
Manish Giri
@Manish-Giri
Jul 19 2017 21:13
@diomed wow the guy must have really copied a lot
Joseph
@revisualize
Jul 19 2017 21:14
This message was deleted
Darren
@DarrenfJ
Jul 19 2017 21:30
@CentropyIT late reply I know but apparently you can use a desktop app ass well for git-it: https://github.com/jlord/git-it-electron
Eunice Park
@eunicode
Jul 19 2017 21:34
I have a basic CSS question. Can anyone please tell me how to get the background-color to fill the whole page: https://jsfiddle.net/xLp2k7bg/
I can do it with the body element selector, but not with a class selector. I've tried setting height.
Albert Cardona II
@daddycardona
Jul 19 2017 21:36
body{background-color: color;}
Eunice Park
@eunicode
Jul 19 2017 21:37
@daddycardona thank you, but I already know how to do it with the body element selector. I don't know how to do it with a class selector though.
CamperBot
@camperbot
Jul 19 2017 21:37
eunipa sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 276 | @daddycardona |http://www.freecodecamp.com/daddycardona
Albert Cardona II
@daddycardona
Jul 19 2017 21:37
yup
Eunice Park
@eunicode
Jul 19 2017 21:39
Hmmm... I think you misunderstood my question?
Albert Cardona II
@daddycardona
Jul 19 2017 21:41
<body class="someClass"> someClass{background-color:color;}
or are you tring to do it in a div
@eunipa
sorry its .someClass
Eunice Park
@eunicode
Jul 19 2017 21:42
@daddycardona yes, I'm trying to do it with <div class="wrapper> https://jsfiddle.net/xLp2k7bg/
Albert Cardona II
@daddycardona
Jul 19 2017 21:44
.someClass{background:color;}
Eunice Park
@eunicode
Jul 19 2017 21:46
@daddycardona unfortunately, that doesn't work
Albert Cardona II
@daddycardona
Jul 19 2017 21:46
what is your code
Eunice Park
@eunicode
Jul 19 2017 21:47
Albert Cardona II
@daddycardona
Jul 19 2017 21:50
so what you have works what color do you want it? and you have to maximize your height
Eunice Park
@eunicode
Jul 19 2017 21:56
@daddycardona No, it actually doesn't ^^
It's okay. I got the answer from the HelpFrontEndProjects chat.
Albert Cardona II
@daddycardona
Jul 19 2017 21:56
@eunipa ```
.wrapper {
   max-width: 100lh;
   height: 100vh;
   margin: 0 auto; 
   padding:0 auto;
  background-color:green;
  text-align: center;
}
Eunice Park
@eunicode
Jul 19 2017 21:57
@daddycardona yes, I had to define the dimensions.
Albert Cardona II
@daddycardona
Jul 19 2017 21:57
change that to % in width lol
that worked fine you also had that in comments
@eunipa
Daniel Shillinglaw
@GiraffeFFA
Jul 19 2017 22:07
+
aRtoo
@artoodeeto
Jul 19 2017 22:26
heloooo brotha from another mother. so i hvae a function that animates when i hover. but when my mouseOut i just called the same color as the background its working for now because i have a single color background. heres the code.
 function hoverAnimation(html){
    $('.title').hover(function () {
      $(this).css(
        'background-color', 'black'
      )
    }, function(){
      $(this).css(
        'background-color', 'orange'
      )
    });
   };
Coy Sanders
@coymeetsworld
Jul 19 2017 22:27
well if no one knows the answer here maybe the other 3 rooms you simultaneously posted the same question will have someone that does
Gulsvi
@gulsvi
Jul 19 2017 22:38
@artoodeeto What's your question?
Your code looks good - maybe change orange to inherit so it works with other background colors
And, there's no animation going on there - it's just a hover effect
.title:hover {
  background-color: black;
}
^^ That CSS would have the same effect as your jQuery
aRtoo
@artoodeeto
Jul 19 2017 22:40
@SkyC0der whats good bro. ohh. yea. hahaha. effect i mean. ill change that
@SkyC0der inherit works with images??
Gulsvi
@gulsvi
Jul 19 2017 22:40
@artoodeeto background-color does not work with images
aRtoo
@artoodeeto
Jul 19 2017 22:41
@SkyC0der yea if im going to change it ofcourse.
Gulsvi
@gulsvi
Jul 19 2017 22:41
what do you want your image to inherit @artoodeeto ?
inherit can be used on any css property, so I guess the answer is "yes"
aRtoo
@artoodeeto
Jul 19 2017 22:43
@SkyC0der lets say i have a background image then i have hover effect. so what will i put on my mouseOut?? still inherrit?
Gulsvi
@gulsvi
Jul 19 2017 22:44
@artoodeeto If you want to give an element a background color on hover, I wouldn't worry about mousein/mouseout or hover or mouseenter/mouseleave. Just use CSS:
.title:hover {
  background-color: black;
}
aRtoo
@artoodeeto
Jul 19 2017 22:45
@SkyC0der i want it on my js. wanted to learn js. :( but thanks bro you saved me again
CamperBot
@camperbot
Jul 19 2017 22:45
artoodeeto sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2160 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Jul 19 2017 22:46
@artoodeeto A good part of learning JS is knowing when to use it :)
aRtoo
@artoodeeto
Jul 19 2017 22:46
@SkyC0der daayyyuuummm. thats deep bro. haha.
@SkyC0der next time bro. hahaha.
bro quick question
$('.title, description')
@SkyC0der i have 2 elements i want to have an effect on my hover. is that the right syntax??
or $('.title' , 'description')
Gulsvi
@gulsvi
Jul 19 2017 22:48
@artoodeeto $('.title, .description')
(don't forget the dot .)
aRtoo
@artoodeeto
Jul 19 2017 22:49
@SkyC0der oohh. damn! hahaha. been working hard. sorry bro im at work. im looking around. hahaha dont want my boss to see me again
GSGV
@GSGV
Jul 19 2017 22:52

Instructions
Define a variable a with var and initialize it to a value of 9.

// Example
var ourVar = 19;

// Only change code below this line

var A = 9;

What am i doing wrong? I've also tried var varA = 9;

its case sensitive isn't it?
baha yep...
jk jk i was never here
Sydney
@SydneyWarren
Jul 19 2017 23:06
function convertToRoman(num) {
  var roman = "";
  var romanNumeral = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"];
  var numbers = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1];
  for (var i = 0; i < numbers.length; i++) {
    while (num >= numbers[i]) {
      roman = roman + romanNumeral[i];
      num = num - numbers[i];

    }
  }console.log(roman);
  return roman;

}
convertToRoman(898);
i have a question question when the for loop is running will it iterate a number that's not in the numbers array like 49, 852, and 2001
korzo
@korzo
Jul 19 2017 23:11
@SydneyWarren Yes. It iterate while num is less than numbers[i].
Sydney
@SydneyWarren
Jul 19 2017 23:12
@korzo so between 0-1000
korzo
@korzo
Jul 19 2017 23:13
@SydneyWarren For 2001. 1.loop : 2001, 2.loop: 1001, 3.loop: 1
Sydney
@SydneyWarren
Jul 19 2017 23:14
i confused to how the loop is even running
where does it start and end?
doesn't it start at 0?
korzo
@korzo
Jul 19 2017 23:14
@SydneyWarren No. It starts at numbers[0] (1000), then 900, 500 ....
Sydney
@SydneyWarren
Jul 19 2017 23:15
so only 13 times
korzo
@korzo
Jul 19 2017 23:16
@SydneyWarren Yes, but inside it run another loop subtracting from num
Gulsvi
@gulsvi
Jul 19 2017 23:16
@SydneyWarren i will be between 0-12. numbers[i] will be any of the numbers listed in the numbers array. num can be any number of any size.
never mind... chat lag :)
korzo
@korzo
Jul 19 2017 23:17
@SydneyWarren If you are not sure how it works, add console.log and print current values
Joseph
@revisualize
Jul 19 2017 23:33
@SydneyWarren THat's pretty good.
@SydneyWarren I don't understand the for loop
Oh I see.
hmmm.
just1witness
@just1witness
Jul 19 2017 23:42
@sjames1958gm Check it out! I finally figured it out, it works the way I want now. :D
https://codepen.io/Just1witness/pen/BZRozr?editors=1010
Joseph
@revisualize
Jul 19 2017 23:47
@just1witness I don't think your app is correct.
@just1witness It's 77F here in seattle.
But, your app says it is 83
Alexander R Bott
@Abott1222
Jul 19 2017 23:49
Anyone have any good resources to understand promises?
Alexander R Bott
@Abott1222
Jul 19 2017 23:52
@revisualize thx amigo
CamperBot
@camperbot
Jul 19 2017 23:52
abott1222 sends brownie points to @revisualize :sparkles: :thumbsup: :sparkles:
Nathaniel Suchy
@nsuchy
Jul 19 2017 23:52
found the temp and i didn't even give it location access - good work :D
CamperBot
@camperbot
Jul 19 2017 23:52
:star2: 4364 | @revisualize |http://www.freecodecamp.com/revisualize
Alexander R Bott
@Abott1222
Jul 19 2017 23:52
google has really goods docs. I was surprised how well they explained Angular
Joseph
@revisualize
Jul 19 2017 23:54
@nsuchy yeah.. I ran into the same thing.
@nsuchy 83F
Nathaniel Suchy
@nsuchy
Jul 19 2017 23:55
@revisualize it has the location hard coded in
:joy:
Joseph
@revisualize
Jul 19 2017 23:55
oh
aRtoo
@artoodeeto
Jul 19 2017 23:55
guys how can you add multiple style on the .css() function. i have this in code.
  $(this).css(
        'background-color', '#383838', <--this is working
        'color' , 'white' <--this not working, 
      )
Gary
@bluefishmarine
Jul 19 2017 23:56
$("p").css({"background-color": "yellow", "font-size": "200%"});
just1witness
@just1witness
Jul 19 2017 23:57
@nsuchy Thank you!