These are chat archives for FreeCodeCamp/HelpFrontEnd

24th
Aug 2017
Gulsvi
@gulsvi
Aug 24 2017 00:02
Then after you define nextNum, if nextNum is odd, += it to a running total and return the total
Of course, showing you doesn't help you figure it out at all IMO :/
BrianWilliams28
@BrianWilliams28
Aug 24 2017 00:06
@SkyC0der not entirely true...i usually use examples people show me to help me with similar situations in the future. but figuring it out on my way own is definitely better
@SkyC0der thank you !
CamperBot
@camperbot
Aug 24 2017 00:06
brianwilliams28 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2548 | @skyc0der |http://www.freecodecamp.com/skyc0der
CuttureSync
@culturesync
Aug 24 2017 00:17
trying for a CSS/HTML only responsive header nav - need help
https://codepen.io/culturesync/pen/brMwgo
Justin25
@Justin25
Aug 24 2017 00:26
How would I get the id of a span that is inside of a button using jquery?
dananzola
@dananzola
Aug 24 2017 00:31
I need help
with Arrays
in JS
juni
@junipberry
Aug 24 2017 00:31
hey guys
how can I input pie into a math related code
iso
@iso1048
Aug 24 2017 00:32
@Justin25 do you want to select the id of the span or get the value of the id of the span?
juni
@junipberry
Aug 24 2017 00:33
pi
Fernando
@lestairon
Aug 24 2017 00:33
Oh, pi
juni
@junipberry
Aug 24 2017 00:33
lol yes
Justin25
@Justin25
Aug 24 2017 00:33
@gothamknight Get the value of the id of the span
dananzola
@dananzola
Aug 24 2017 00:34
4 spans has the class "parlaycard"
their parent is a tr element
i need to select only 1 span and add its id to an object or array
and if i try to select another span the current selected span will be deleted from the array(edited)
iso
@iso1048
Aug 24 2017 00:34
@Justin25 does the button that the span is nested in have a class or id you could target?
juni
@junipberry
Aug 24 2017 00:34
Perfect, ty @gothamknight
CamperBot
@camperbot
Aug 24 2017 00:34
junipberry sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 393 | @gothamknight |http://www.freecodecamp.com/gothamknight
iso
@iso1048
Aug 24 2017 00:34
@junipberry no problem
Justin25
@Justin25
Aug 24 2017 00:34
The button has an id which I used var test = document.getElementById('test'); to store as a variable
juni
@junipberry
Aug 24 2017 00:35
my google results were all showing keyboard inputs or excel inputs
iso
@iso1048
Aug 24 2017 00:36
not too sure. try something like $('#test span').attr('id'); @Justin25
dananzola
@dananzola
Aug 24 2017 00:37
@gothamknight
think ou can look at my issue?
Justin25
@Justin25
Aug 24 2017 00:37
@gothamknight It returns undefined
iso
@iso1048
Aug 24 2017 00:38
@dananzola you could use a for-loop to loop through the span elements maybe. Do you have it in codepen?
dananzola
@dananzola
Aug 24 2017 00:38
jsfiddle
iso
@iso1048
Aug 24 2017 00:38
@Justin25 did you assign it to a variable?
@dananzola oh sorry bro didnt see that
Jorge
@OrangeKulture
Aug 24 2017 00:38
@dananzola what r u trying to do?
Justin25
@Justin25
Aug 24 2017 00:39
@gothamknight Wait, it does work
juni
@junipberry
Aug 24 2017 00:39
and if I want to square something, can I use exp(x) to do so
dananzola
@dananzola
Aug 24 2017 00:39
4 spans has the class "parlaycard"
their parent is a tr element
i need to select only 1 span and add its id to an object or array
and if i try to select another span the current selected span will be deleted from the array(edited)
Jorge
@OrangeKulture
Aug 24 2017 00:39
lol i think there are two issues with span tags here right? im getting confused haha
Justin25
@Justin25
Aug 24 2017 00:39
@gothamknight I was using the wrong variable
Jorge
@OrangeKulture
Aug 24 2017 00:39
@dananzola how are you gonna add the span? with an event?
Justin25
@Justin25
Aug 24 2017 00:39
@gothamknight Thanks
CamperBot
@camperbot
Aug 24 2017 00:39
justin25 sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 394 | @gothamknight |http://www.freecodecamp.com/gothamknight
iso
@iso1048
Aug 24 2017 00:39
@Justin25 awesome
dananzola
@dananzola
Aug 24 2017 00:40
click event
iso
@iso1048
Aug 24 2017 00:40
@Justin25 no worries
Jorge
@OrangeKulture
Aug 24 2017 00:40
@junipberry JS has a built in math object u can use
dananzola
@dananzola
Aug 24 2017 00:41
@OrangeKulture a click event
juni
@junipberry
Aug 24 2017 00:41
nice, what is it
Jorge
@OrangeKulture
Aug 24 2017 00:41
@dananzola u can use string template interpolation .. as such
juni
@junipberry
Aug 24 2017 00:42
bc Im looking at the js math page and it only shows sqrt
dananzola
@dananzola
Aug 24 2017 00:43
im a Js beginner
=/
Jorge
@OrangeKulture
Aug 24 2017 00:43
let array = [];

$('span').on('click', function(){
let spanSelect = $(`#${this.id}`);
array.push(spanSelect);
})
something like that
@junipberry its used for mathematical operations .. min and max ranges, but theres a lot to it. In reality, if u just wanted to 2X a given integer, it can probably be done as u would normally
for example, Math.PI
@dananzola the thing is tho .. your element ids are not really .. semantic, so to speak
dananzola
@dananzola
Aug 24 2017 00:46
@OrangeKulture i need to select only 1 span and add its id to an object or array
and if i try to select another span the current selected span will be deleted from the array(edited)
i could've used data
but i found id to be easier
juni
@junipberry
Aug 24 2017 00:48
@OrangeKulture so..
that does not help w what I am looking for
so is there a object method or it?
*for it
through Math properties
Jorge
@OrangeKulture
Aug 24 2017 00:50
@dananzola yeah, i mean .. the on click event handler i poster will add the id of the element click to the array. Push method adds to the array and you shouldnt see it being replaced, from that function alone
there has to be something else on your code that's causing the problem for you
@junipberry sry, not really sure what u wanted to do ..
juni
@junipberry
Aug 24 2017 00:51
I want to square a number
any (num)
Jorge
@OrangeKulture
Aug 24 2017 00:51
but with a function? or ..
function doubleIt(num){
 return num * num;
}

doubleIt(5)  // returns 25
if u mean the root ..
then u can use sqrt() method .. i think someone mentioned that before
Gulsvi
@gulsvi
Aug 24 2017 00:54
@junipberry
var radius = 10;
var circleArea = Math.PI * Math.pow(radius, 2);
console.log(circleArea); // 314.1592653589793
Jorge
@OrangeKulture
Aug 24 2017 00:54
its another property of Math .. math is an object .. so Math.sqrt(9) is 3
Justin25
@Justin25
Aug 24 2017 00:54
My post request id retrieving information from the database but not rendering the ejs file. app.post('/open', (req, res) => { db.collection(req.body.name).find().toArray((err, result) => { if (err) return console.log(err) console.log("show set"); res.render('setView.ejs', {quotes: result}) }) })
juni
@junipberry
Aug 24 2017 00:54
awesome, thanks again @SkyC0der
CamperBot
@camperbot
Aug 24 2017 00:54
junipberry sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2551 | @skyc0der |http://www.freecodecamp.com/skyc0der
juni
@junipberry
Aug 24 2017 00:55
sky, I got a little confused w the diff bw unshift and push
its showing the definition of unshift to be the same as push..
unshift adds to the beginning, push adds to the end
shift removes from the beginning, pop removes from the end
Their wording is a little confusing in that challenge @junipberry
.unshift() works exactly like .push(), but instead of adding the element at the end of the array, unshift() adds the element at the beginning of the array.
maybe looking at that image it helps
juni
@junipberry
Aug 24 2017 01:06
ah thanks @SkyC0der
CamperBot
@camperbot
Aug 24 2017 01:06
:warning: junipberry already gave skyc0der points
junipberry sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
juni
@junipberry
Aug 24 2017 01:08
sky, is array.prototype.push.applythe right approach when I want to merge two arrays?
and keeping the arrays (arr1, arr2)
thinsoldier
@thinsoldier
Aug 24 2017 01:14
I've got database output that shows times with the time zone of the database server. How can I adjust that output on the fly to show the times in the current visitor's time zone?
Michael Norris
@Norrismi
Aug 24 2017 01:18
For the Quote Machine project do we need to use .forEach() method in JQuery?
Jorge
@OrangeKulture
Aug 24 2017 01:18
@thinsoldier u can use the date method on the front end
@Norrismi u dont HAVE to use anything, you can pretty much do it however it comes easier for you
Michael Norris
@Norrismi
Aug 24 2017 01:20
Yes, I understand, I am having problems looping over my <li>
Jorge
@OrangeKulture
Aug 24 2017 01:21
are u working on codepen?
Michael Norris
@Norrismi
Aug 24 2017 01:21
    <script type = "text/javascript">
        $(document).ready(function(){
            for (i=0; i <=5 ; i++){
                $(".quoteBox").click(function(){
                    $(".quote").html('<li class="quote'+i+'"></li>');
                });
            }
        });
        </script>

<ul class="quoteBox">
                <li class = "quote">Press the quote button to receive a new quote!</li>
                <li class = "quote" style="display:none;">new quote 1!</li>
                <li class = "quote" style="display:none;">new quote 2!</li>
                <li class = "quote" style="display:none;">new quote 3!</li>
                <li class = "quote" style="display:none;">new quote 4!</li>
                <li class = "quote" style="display:none;">new quote 5!</li>
            </ul>
Pagnito
@Pagnito
Aug 24 2017 01:22
@SkyC0der yo do u know if making event handlers in child components isnt done in react?
Michael Norris
@Norrismi
Aug 24 2017 01:22
This is not the entire code just snippets of the main stuff
Jorge
@OrangeKulture
Aug 24 2017 01:22
@Norrismi u cant assign a click event handler inside a for loop .. in fact, its best if you dont use any functions within loops
Michael Norris
@Norrismi
Aug 24 2017 01:23
ohhh ok
Jorge
@OrangeKulture
Aug 24 2017 01:24
are you hard coding the quotes? or using an API ?
Michael Norris
@Norrismi
Aug 24 2017 01:24
This is all in an index.html file, so I guess hard coding...
Jorge
@OrangeKulture
Aug 24 2017 01:27
yeah im just curious as to where you plan to get the actual content .. u know the quotes. If you are going to write them yourself within the file or if you plan on using external content
Michael Norris
@Norrismi
Aug 24 2017 01:29
oh, with in the file. I just wanted to keep it simple for testing the looping. When it is working properly, I will touch up the <ul><li> quotes
Jorge
@OrangeKulture
Aug 24 2017 01:30
yeah .. the thing is, in my opinion, you should try to handle what you are doing differently .. also, if you assign a display value of none, you would have to reset it to something else for it to show ..
if u tell me what the basic functionality u are trying to accomplish, i can help you out for sure .. i dont really get what u wanna do from this code
CuttureSync
@culturesync
Aug 24 2017 01:31

need some help with my CSS only Mobile Nav Bar
Click Here for Pen.
HTML

<header>
    <div class="row">
      <div class="col-1 img">
        <img src="https://lh3.googleusercontent.com/qRKFHIzhalcEiJTK6rVCaNQl-5NPofmZf_CdvtXCgPzQIFci0KX-9UUk-jB_8M87lcg=w170" width="75" height="75">
      </div>

      <div class="col-10">

        <nav class="menu">

          <a id="i-nav" href="#"></a>

          <ul>
            <a href='#' data-pos="home"> <li>home</li></a>
            <a href='#' data-pos="about"><li> about </li></a>
            <a href='#' data-pos="donate"><li> donate </li></a>
          </ul>

        </nav>
      </div>
    </div>
  </header>

CSS

header {
  background-color: rgba(43, 43, 43, 1);
  margin: 1% 4%;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.44);
}
.img {
  max-width: 100%;
  height: auto;
  text-align: center;
}
ul {
  text-align: center;
  list-style-type: none;
}
ul li {
  display: inline-block;
  font-size: 1.2em;
  border: 1px none transparent;
  margin: 8px 10px;
  padding: 2px 70px;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.34);
}
ul li:hover {
  color: rgba(23, 23, 23, 1);
  background-color: rgba(252, 176, 167, 1);
  border: 1px solid white;
  border-radius: 5px;
  transition: all 400ms ease-in 0s;
}

#i-nav{
  positon: absolute;
  display: block;
  top: 50px;
  right: 50px;
  width: 22px;
  hight: 22px;
  background: aqua;
}
.show {
  display: block;
}

@media screen and (max-width: 760px) {

  ul {
    display: none;
    width: 100%;
  }
  li {
    margin-bottom: 1px;
  }
  ul li, li a {
    width: 100%;
  }
}
Jorge
@OrangeKulture
Aug 24 2017 01:33
@culturesync u might wanna check out bootstraps responsive navbars ..
CuttureSync
@culturesync
Aug 24 2017 01:33
Please help if you can. I seem to be missing something. The CSS grid columns don't seem to be the problem as I have edited them out from the header.
@OrangeKulture Know of this already, I know I can do it but it'll override my CSS grid format. I'm trying to master pure CSS rather than using bootstrap
Michael Norris
@Norrismi
Aug 24 2017 01:34
@OrangeKulture This is for the Build a Random Quote Machine project. Using a click event to loop over quotes in a Div.
Jorge
@OrangeKulture
Aug 24 2017 01:36
@culturesync ok .. what are you trying to make happen?
the ul has a display of none on mobiles
CuttureSync
@culturesync
Aug 24 2017 01:36
I am trying to do a CSS responsive mobile nav
Jorge
@OrangeKulture
Aug 24 2017 01:36
@Norrismi yeah but you are talking about two different things .. one is the logic, the looping, and other is the rendering .. which is the html tag, DIV ..
@Norrismi also, you have to loop over something .. u cant loop over html elements, u need data
CuttureSync
@culturesync
Aug 24 2017 01:37
Click Here to view the Pen and Code
@OrangeKulture
Jorge
@OrangeKulture
Aug 24 2017 01:38
@culturesync yeah i saw the pen .. what i dont get is, what seems to be the problem?
Michael Norris
@Norrismi
Aug 24 2017 01:38
I though the data was in the html... the <ul><li>. Should I make an array holding all of the quotes @OrangeKulture
CuttureSync
@culturesync
Aug 24 2017 01:39
So the <a id="i-nav" href="#"></a> is not appearing on the page
Jorge
@OrangeKulture
Aug 24 2017 01:39
@Norrismi exactly
take this for example:
Siddarth Krishnan
@siddarthk123
Aug 24 2017 01:40
@siddarthk123
hey
i ned help
printing text
on a canvas
printing text on a canvas
and then
like creating a countdown on the canvas
and then it goes from 60-59-58-57
how do i do that?
Jorge
@OrangeKulture
Aug 24 2017 01:41
const quotes = [
'first quote',
'second quote',
'third quote'
]

$(".quoteBox").on('click', function(){
                   let select = Math.floor(1 + Math.random()*3);
                  $('.quote').text(quotes[select]);
                });
something like that
CuttureSync
@culturesync
Aug 24 2017 01:41
@OrangeKulture also when you change the screen size the mobile menu doesn't show up. I am missing a piece of code and I've been staring at my screen too long to figure out what it is. I even watched a couple of tutorials online and read a blog article to see what was missing and It's not coming to me
Jorge
@OrangeKulture
Aug 24 2017 01:42
@culturesync that anchor tag is not gonna appear because it's not attached to anything
Michael Norris
@Norrismi
Aug 24 2017 01:43
@OrangeKulture ok awesome, that will at least put me on a good path, thanks!
CamperBot
@camperbot
Aug 24 2017 01:43
norrismi sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 439 | @orangekulture |http://www.freecodecamp.com/orangekulture
Jorge
@OrangeKulture
Aug 24 2017 01:43
@Norrismi sure! not a problem .. if you need any more help, let me know
@siddarthk123 lol dude .. why are u using canvas .. i remember you said something about a cup filling .. you might wanna try to get the logic from the clock down first, and then do something with the design
CuttureSync
@culturesync
Aug 24 2017 01:45
@OrangeKulture I attached some text and it shows up now. Thanks for the input. Last question... do I have to attach something? Or is there a way to have empty space.
CamperBot
@camperbot
Aug 24 2017 01:45
culturesync sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 440 | @orangekulture |http://www.freecodecamp.com/orangekulture
CuttureSync
@culturesync
Aug 24 2017 01:47
I attached some text and it shows up now. Thanks for the input. Last question... do I have to attach something? Or is there a way to have empty space.
@OrangeKulture f I switched it to a divwith the id.. that would work
CamperBot
@camperbot
Aug 24 2017 01:47
culturesync sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:warning: culturesync already gave orangekulture points
CuttureSync
@culturesync
Aug 24 2017 01:47
theoretically
Jorge
@OrangeKulture
Aug 24 2017 01:47
@culturesync yeah.. theres several ways you could handle that .. wrap the anchor tag around another element, i mean an a tag is there so that the user clicks .. if there is nothing there, no need for an a tag ..
exactly
around a div with some width n height, altho itll take the space
Chris Cullen
@123xylem
Aug 24 2017 01:49

Can Someone help me getting my c9 project onto github.
Ive had to add an index.html and move all my files to accomodate it. But the linking is totally different now.

https://123xylem.github.io/CullenPortfolio/#
This is my page...

I had all my files linked to homepage.ejs and the architecture in C9 was setup correctly .. But when I have to put them onto an index.html the architecture changes. None of my css is linking for example.. And I dont know hto to link my header.ejs...

Jorge
@OrangeKulture
Aug 24 2017 01:51
@123xylem u have several problems .. u are requesting some data over http, and it doesnt like that
@123xylem also .. routing. I had this happen to me when deploying my angular app to gh pages ... it probably has to do with relative paths in your CSS rules
Chris Cullen
@123xylem
Aug 24 2017 01:55
@OrangeKulture my main has a lot of @import css files... But I just dumped all the relevant css into my main css file to see if it would link.. It wont.
I dont know which path to use as it is lookin in www.github.io........
Siddarth Krishnan
@siddarthk123
Aug 24 2017 02:02
i have a question
iso
@iso1048
Aug 24 2017 02:03
@siddarthk123 ask away
Jorge
@OrangeKulture
Aug 24 2017 02:03
@123xylem hmm yeah .. i mean the folder structure is kinda weird for me. try adding <base href="/"> in the head
@123xylem it definitely is a path issue .. your JS is loading and most of the pictures and stuff .. im guessing its a matter of pointing to the right directory
Siddarth Krishnan
@siddarthk123
Aug 24 2017 02:20
gotham
knight
can u help me
put like countdown text
inside a canvas?
iso
@iso1048
Aug 24 2017 02:21
@siddarthk123 ah sorry man, I don't know about that stuff
Siddarth Krishnan
@siddarthk123
Aug 24 2017 02:22
hey
so
can you help me
Ken Haduch
@khaduch
Aug 24 2017 02:27
@siddarthk123 - I don't know if I can help you, but do you have a project that you're working on that you can share a link to? I have something like this, but I used an overlay div and put text in that, I think.
Janice He
@Janicekwing
Aug 24 2017 02:29
Can someone help me... I am at " build a personal website ", I want to upload a photo from my computer but I'm not sure how that is possible with codepen?
CuttureSync
@culturesync
Aug 24 2017 02:29
@gothamknight Tried to make the meu collapsable, but I don't really need to since I on't have 3 tabs
Ken Haduch
@khaduch
Aug 24 2017 02:29
@Janicekwing - you can use something like dropbox, or there are free sites that you can upload to.
CuttureSync
@culturesync
Aug 24 2017 02:30
@gothamknight I think I should make it disappear and reappear on scroll down. What do you think about that idea style wise?
juni
@junipberry
Aug 24 2017 02:30
guys, can I not have a conditional here?
function getFirstElement(array) {
  if (array.length = 0) {
    console.log(undefined);
} else 
    return array.length[0];
}
Jorge
@OrangeKulture
Aug 24 2017 02:30
@siddarthk123 try this: Timer
@junipberry u are using an assignment = not comparison .. u need to say array.length == 0
Ken Haduch
@khaduch
Aug 24 2017 02:31
@Janicekwing - http://postimg.org is one example. Imgur is not a good choice as they do not allow cross-linking.
Jorge
@OrangeKulture
Aug 24 2017 02:32
postimage.io is really good .. send it over https, so its solid
Janice He
@Janicekwing
Aug 24 2017 02:32
@OrangeKulture @khaduch thank you :) I will give it a try
CamperBot
@camperbot
Aug 24 2017 02:32
janicekwing sends brownie points to @orangekulture and @khaduch :sparkles: :thumbsup: :sparkles:
:cookie: 441 | @orangekulture |http://www.freecodecamp.com/orangekulture
:star2: 3235 | @khaduch |http://www.freecodecamp.com/khaduch
iso
@iso1048
Aug 24 2017 02:33
@culturesync yeah that will be fine. You are right that there is not much point having a collapsible menu with only 3 tabs. (however, in smaller screen sizes, it could be useful). I made my portfolio ages ago and it is terrible. I plan to redo it later on. So just keep in mind that you can always improve your portfolio later on!
@Janicekwing I find cloudinary useful
juni
@junipberry
Aug 24 2017 02:34
alright @OrangeKulture I fixed that part
but still not passing
CuttureSync
@culturesync
Aug 24 2017 02:35
Thnaks for the encouragement. I just started learning and I've only been at it for a month and then I took a 3 month break and now I'm back at it again.
So i'm super rusty on the very very little that I know
iso
@iso1048
Aug 24 2017 02:36
@culturesync true. Yeah I do not get to code that much either - trying to balance uni and coding. So when exams come around, I barely touch any code.
@junipberry should return array.length[0]; just be return array[0];?
juni
@junipberry
Aug 24 2017 02:37
@gothamknight yes! ty, nice catch!
CamperBot
@camperbot
Aug 24 2017 02:37
junipberry sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 395 | @gothamknight |http://www.freecodecamp.com/gothamknight
iso
@iso1048
Aug 24 2017 02:37
no problem
Chris Cullen
@123xylem
Aug 24 2017 02:38
@OrangeKulture thanks looking into it
CamperBot
@camperbot
Aug 24 2017 02:38
123xylem sends brownie points to @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 442 | @orangekulture |http://www.freecodecamp.com/orangekulture
Jorge
@OrangeKulture
Aug 24 2017 02:43
@123xylem sure np, hope u can solve it
CuttureSync
@culturesync
Aug 24 2017 02:43
@gothamknight I just started my path to a computer science degree, I'm doin' this free tuition online college this through a university
@gothamknight when you gotta study you gotta study
Chris Cullen
@123xylem
Aug 24 2017 02:44
@OrangeKulture https://123xylem.github.io/CullenPortfolio/
I just dumped the style into the header ...lol.. Still its not showing as it should but at least I can view it remotely now
iso
@iso1048
Aug 24 2017 02:44
@culturesync yeah ive looked at some online courses. I enjoy coding more than my degree though haha
CuttureSync
@culturesync
Aug 24 2017 02:45
@123xylem That looks way better than my portfolio project XD
Fernando
@lestairon
Aug 24 2017 03:24

function largestOfFour(arr) {
  // You can do this!
  var largNum = [];
  for (var i = 0; i < arr.length; i++) {
    for (var x = 0; x < arr[i].length; x++) {
      while (arr[i][x] > largNum[i]) {
        largNum.push(arr[i][x]);
      }
    }
  }
  return largNum;
}

largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);
How is it not working?
@lestairon What does it output?
Fernando
@lestairon
Aug 24 2017 03:27
[]
John
@AnonymousLords
Aug 24 2017 03:28
ok
Stat putting console.log throughtout your code
@lestairon Your pushing it, not replacing it
Like 5 is bigger then 4, your just pushing it into a empty array
Fernando
@lestairon
Aug 24 2017 03:33
I think it should work if i push it into an empty array
John
@AnonymousLords
Aug 24 2017 03:33
Okay
ask someone with a ot of coing experince
@ them :P
I gotta go do something else
sorry
Fernando
@lestairon
Aug 24 2017 03:34
Np, ty ^^
John
@AnonymousLords
Aug 24 2017 03:34
Just using console.log() threwout your code
Zac Cassini
@zcassini
Aug 24 2017 03:44
@lestairon you dont need the while
Zachary Orona-Calvert
@TheTRUEHoohah
Aug 24 2017 03:44
$("#tako").click(function() {
var combos = [
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2",
"U",
"R2",
"R",
"'R",
"'M",
"L",
"L'",
"L2",
"M",
"M2",
"'D",
"D2",
"D",
"'U",
"U2"
];
var comm = [];
var com = [];
for (; comm.length < 21; ) {
comm.push(combos[Math.floor(combos.length * Math.random())]
);
Jody LeCompte
@jodylecompte
Aug 24 2017 03:45
@lestairon The issue is there is nothing there
Zachary Orona-Calvert
@TheTRUEHoohah
Aug 24 2017 03:45
hey guys how could I .replace the comm array to remove to consecutive moves that are the same
for example R,R to R2
Zac Cassini
@zcassini
Aug 24 2017 03:46
@TheTRUEHoohah next time plz dont paste something so big
Zachary Orona-Calvert
@TheTRUEHoohah
Aug 24 2017 03:47
sorry ;)) i just wanted to include the arrays and loop my badd
Zac Cassini
@zcassini
Aug 24 2017 03:48
nyhow i would use reduce
Jody LeCompte
@jodylecompte
Aug 24 2017 03:49
I modified your code by adding console.log("I never happen"); on line 7 to confirm that block of code is not running. Until you push, there is nothing there, so the first iteration it says while 4 > undefined push the value to the array, this pushed value will never happen. A better way to approach is to replace that with a local reference variable. Inside your first for loop, create a variable to store the largest number and set it to 0 by default, then each iteration of your nested for loop you say "Is value greater than current largest?" If yes, it replaces it and then after the nested for loop, push largest value to the array. The reference value will reset to 0 and the end result will be an array containing X values where X is the number of arrays you feed it in input
@lestairon ^
Chris Cullen
@123xylem
Aug 24 2017 03:55
https://cullen-portfolio.herokuapp.com/
Im trying to make my divs slide down when hovered on but they act crazy... Any Tips?
     <div class="expandable2" >

                <a href="#">  <h4 class="homeH4"><strong>SEO Services  </strong>  <i class="fa  fa-chevron-down" aria-hidden="true"></i>  </h4></a>
                <div class="showMe2 meSkills" style="display:none" >

 <script>  
                 $(".expandable").mouseover(function(){
                     $(".showMe").slidedown();
                     });


                 $(".expandable2").mouseover(function(){
                     $(".showMe2").slideToggle();
                 });
</script>
When I hover on them they slide down and up
Long Nguyen
@longnt80
Aug 24 2017 04:27
@123xylem don't use .slideToggle()
you also need to use 2 events: mouseover and mouseout
Chris Cullen
@123xylem
Aug 24 2017 04:39
@longnt80 ok il look into that thanks
CamperBot
@camperbot
Aug 24 2017 04:39
123xylem sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 528 | @longnt80 |http://www.freecodecamp.com/longnt80
prakash chandra yadav
@prakashyadav008
Aug 24 2017 05:10
@jimtryon i changed the size of the search button so the space was goe
gone*
Sorin Ruse
@sorinr
Aug 24 2017 05:49
@123xylem i would use mouseenter function along with mouseout
@123xylem mouseover is triggered even when the div is expanded thats why slideToggle behaves that way
Sorin Ruse
@sorinr
Aug 24 2017 05:56
@123xylem here some example on using mouseenter and mouseleave
Chris Cullen
@123xylem
Aug 24 2017 06:35
@sorinr thanks
CamperBot
@camperbot
Aug 24 2017 06:35
123xylem sends brownie points to @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1329 | @sorinr |http://www.freecodecamp.com/sorinr
Sorin Ruse
@sorinr
Aug 24 2017 06:41
@123xylem welcome
Rafael Monroy
@rafaelmonroy
Aug 24 2017 06:48

hello, how can I get jquery to alert the text inside an h1 tag

jQuery(document).ready(function($) {
    alert("h1");
});

this code is not working

Sorin Ruse
@sorinr
Aug 24 2017 06:51
@rafaelmonroy see the response in the other fcc room
Ene Catalin
@EneCatalin
Aug 24 2017 06:52
@rafaelmonroy you're not alerting any content there
just a string, that will print exactly what you give it, letter for letter
Rafael Monroy
@rafaelmonroy
Aug 24 2017 06:53
there’s no way to alert a string from a tag?
David
@deitcode
Aug 24 2017 07:10
@rafaelmonroy i think you need to select the content inside of the h1 by doing something like alert($("h1").text())
Rafael Monroy
@rafaelmonroy
Aug 24 2017 07:10
@deitcode thanks!
CamperBot
@camperbot
Aug 24 2017 07:10
rafaelmonroy sends brownie points to @deitcode :sparkles: :thumbsup: :sparkles:
:cookie: 263 | @deitcode |http://www.freecodecamp.com/deitcode
David
@deitcode
Aug 24 2017 07:10
or innerText? need to check that
Hamza Anwer
@ImHamzaAnwer
Aug 24 2017 07:40
here is the room for react, redux and firebase development i just created, please suggest this to other devs involved in these techs
Rafael Monroy
@rafaelmonroy
Aug 24 2017 07:55

can anyone tell my why this code does link properly to my js file?

<!DOCTYPE html>
<head>
    <link rel="stylesheet" type="text/css" href="css/style.css"
    <script src="main.js"></script>    
</head>

<body>
    <h1>hello</h1>
</body>
<html>

index.html and main.js are in the same folder
here is the code in my js file
var word = "Hello";
alert(word);
thanks in advance!

iso
@iso1048
Aug 24 2017 07:58
@rafaelmonroy not too sure but your link tag is missing > at the end
Markus Kiili
@Masd925
Aug 24 2017 07:58
@rafaelmonroy You need a starting <html> tag after doctype
And ending one </html> at the end.
So head and body elements inside html element.
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:00
@gothamknight @Masd925 thanks that fixed the issue
CamperBot
@camperbot
Aug 24 2017 08:00
rafaelmonroy sends brownie points to @gothamknight and @masd925 :sparkles: :thumbsup: :sparkles:
:cookie: 396 | @gothamknight |http://www.freecodecamp.com/gothamknight
:star2: 4436 | @masd925 |http://www.freecodecamp.com/masd925
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:12
is this the proper way to link to jquery CDN?
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <script src="js/main.js"></script>    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</head>

<body>
    <h1>hello</h1>
</body>
</html>
Hamza Anwer
@ImHamzaAnwer
Aug 24 2017 08:13
@rafaelmonroy i think you should use scripts tag in body tag in the last, so it will run properly when all the document is loaded
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:14
@ImHamzaAnwer ok let me see if that works
@ImHamzaAnwer so changed it to this
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
    <h1>hello</h1>
    <script src="js/main.js"></script>    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
</body>
</html>
but my jquery function wont execute
Hamza Anwer
@ImHamzaAnwer
Aug 24 2017 08:16
@rafaelmonroy take jquery script on first and your custom js on second
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:17
ok i see, still no luck after chaging
iso
@iso1048
Aug 24 2017 08:17
@SkyC0der what you doing up so late bro?
Gulsvi
@gulsvi
Aug 24 2017 08:18
Too much coffee :)
iso
@iso1048
Aug 24 2017 08:18
@SkyC0der oh haha. how long till you leaving?
Gulsvi
@gulsvi
Aug 24 2017 08:18
3 days :)
Hamza Anwer
@ImHamzaAnwer
Aug 24 2017 08:18
@rafaelmonroy it should work check your main.js if there is some error
iso
@iso1048
Aug 24 2017 08:19
@SkyC0der far out
@SkyC0der so you are going to do like absolutely no coding now or just a lot less?
Gulsvi
@gulsvi
Aug 24 2017 08:20
Absolutely no coding
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:20
@SkyC0der hey whats up, the link takes me to my codepen that im currently working on, was it suppose to be something else?
Gulsvi
@gulsvi
Aug 24 2017 08:20
@rafaelmonroy It's should show an alert, showing your JS is working
iso
@iso1048
Aug 24 2017 08:21
@SkyC0der damn. what will we do without you.
Gulsvi
@gulsvi
Aug 24 2017 08:21
@gothamknight you'll have plenty of others here
@rafaelmonroy It isn't your codepen, btw, just an anonymous version I created from the code snippets you posted above here in chat
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:22
@ImHamzaAnwer this is the code I have in my main.js
$(document).ready(function(){
    $("h1").fadeIn("slow");
});
Gulsvi
@gulsvi
Aug 24 2017 08:22
.fadeIn() only works if the element is hidden first
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:22
@SkyC0der oh cool man thanks
CamperBot
@camperbot
Aug 24 2017 08:22
rafaelmonroy sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2552 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Aug 24 2017 08:22
$(document).ready(function(){
    $("h1").hide().fadeIn("slow");
});
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:23
ahh ok
fadeOut made it go away
Hamza Anwer
@ImHamzaAnwer
Aug 24 2017 08:23
thats right
Gulsvi
@gulsvi
Aug 24 2017 08:23
Or, try this way, and you'll definitely see it:
$(document).ready(function(){ 
  $("h1").hide().fadeIn(3000); 
});
3 second fade in
iso
@iso1048
Aug 24 2017 08:23
@SkyC0der mate...you the man
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:23
@SkyC0der yeah! that did it, cool thanks @ImHamzaAnwer also
CamperBot
@camperbot
Aug 24 2017 08:23
rafaelmonroy sends brownie points to @skyc0der and @imhamzaanwer :sparkles: :thumbsup: :sparkles:
:warning: rafaelmonroy already gave skyc0der points
:cookie: 306 | @imhamzaanwer |http://www.freecodecamp.com/imhamzaanwer
Gulsvi
@gulsvi
Aug 24 2017 08:24
¯\(ツ)
Rafael Monroy
@rafaelmonroy
Aug 24 2017 08:24
lol
Gulsvi
@gulsvi
Aug 24 2017 08:27
You can chain those together too
$(document).ready(function(){ 
  $("h1").fadeOut().fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().fadeOut().fadeIn(); 
});
(not that you'd want to, but just to show it)
iso
@iso1048
Aug 24 2017 08:27
@SkyC0der yeah a bit too much coffee
Gulsvi
@gulsvi
Aug 24 2017 08:28
lol
1:30am here...enjoying my last few days of summer finishing the pairwise algo
Still have Exact Change...I think that's officially the hardest one
(for me at least)
iso
@iso1048
Aug 24 2017 08:30
@SkyC0der oh right haha.
Gulsvi
@gulsvi
Aug 24 2017 08:30
wonder if @MathematicsCoding or @EgnaroDev did that one yet
iso
@iso1048
Aug 24 2017 08:30
havent 'seen' @EgnaroDev for a while now
Markus Kiili
@Masd925
Aug 24 2017 08:30
@SkyC0der Anything that can be done in one line cannot be that hard ;)
iso
@iso1048
Aug 24 2017 08:31
@SkyC0der still doing much codewars?
gulsvi @SkyC0der checks out Masd925's profile :)
Gulsvi
@gulsvi
Aug 24 2017 08:31
You used 20 lines :p
@gothamknight I did a bunch of Kyu8 exercises today
There's one you should try - one second
Markus Kiili
@Masd925
Aug 24 2017 08:33
@SkyC0der It is possible to squeeze it into one-liner. You can google my gist of FCC one liners.
Gulsvi
@gulsvi
Aug 24 2017 08:33
@Masd925 Thanks :) I might get desparate and check it out
CamperBot
@camperbot
Aug 24 2017 08:33
skyc0der sends brownie points to @masd925 :sparkles: :thumbsup: :sparkles:
:star2: 4437 | @masd925 |http://www.freecodecamp.com/masd925
Gulsvi
@gulsvi
Aug 24 2017 08:33
How about my pairwise solution?
function pairwise(arr, arg) {
  return arr.reduce((acc, num, i, a) => {
    const x = a.indexOf(arg - num, i + 1);
    return x > 0 ? ((a[x] = NaN), acc + i + x) : acc;
  }, 0);
}
So unreadable....but short
iso
@iso1048
Aug 24 2017 08:34
@SkyC0der ill try later still im still trying to figure out my navbar functionality
Gulsvi
@gulsvi
Aug 24 2017 08:35
var theWordNeedleWhichWillNeedToBeFoundWithinTheHaystackContainingTheNeedle = [].concat(n).concat(e).concat(e).concat(d).concat(l).concat(e).join('');
That's one of many, many lines of code
iso
@iso1048
Aug 24 2017 08:36
@SkyC0der what on earth haha.
Gulsvi
@gulsvi
Aug 24 2017 08:37
Someone made an easy one-liner into a 30+ line answer
iso
@iso1048
Aug 24 2017 08:39
@SkyC0der ive lately been getting distracted by gordan ramsey talking the funniest shit in kitchen nightmares.
Gulsvi
@gulsvi
Aug 24 2017 08:39
lmao, he is really funny on twitter
my gf and I watch master chef jr too
what's up with your navbar @gothamknight ?
iso
@iso1048
Aug 24 2017 08:41
@SkyC0der nah but he cant swear at the kids though so its not funny
Gulsvi
@gulsvi
Aug 24 2017 08:41
lol, it's true, if he gets even a little bit mean, they all start crying
iso
@iso1048
Aug 24 2017 08:43
https://codepen.io/gothamknight/pen/jLzrBm?editors=0010 i haven't really decided on an approach yet but it is just controlling the icon of the buttons and what the buttons do when they are clicked when a item from the navbar is already extended
Gulsvi
@gulsvi
Aug 24 2017 08:44
That's awesome @gothamknight ! really coming together :)
iso
@iso1048
Aug 24 2017 08:44
@SkyC0der haha thanks bro.
CamperBot
@camperbot
Aug 24 2017 08:44
gothamknight sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2554 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Aug 24 2017 08:44
I like the animations - it all seems smooth
iso
@iso1048
Aug 24 2017 08:45
@SkyC0der Yeah i'm a sucker for that 'slide' effect when it comes to a collapsible navbar. man, you still havent used the star wars api. I was looking forward to see what you would do with it.
guess i'll have to wait a year
Gulsvi
@gulsvi
Aug 24 2017 08:46
haha, yeah, I'm out of inspiration :( trying to figure out how to be a spaniard
iso
@iso1048
Aug 24 2017 08:47
@SkyC0der are you definitely going to get back to coding after your trip?
i hope you are
Gulsvi
@gulsvi
Aug 24 2017 08:47
I don't see why not
but who knows... 10 months is a long time
iso
@iso1048
Aug 24 2017 08:47
mean
Gulsvi
@gulsvi
Aug 24 2017 08:47
I started here 7 months ago
iso
@iso1048
Aug 24 2017 08:48
Bro, work as a developer in spain.
Gulsvi
@gulsvi
Aug 24 2017 08:48
I wish they let Canadians work there....seems I need to be in the EU
iso
@iso1048
Aug 24 2017 08:48
@SkyC0der yeah I might be the same if not more. What a contrast
@SkyC0der haha
Gulsvi
@gulsvi
Aug 24 2017 08:48
I better delete that in case they find me lol
iso
@iso1048
Aug 24 2017 08:49
yeah or worse, your girlfriend sees it
Gulsvi
@gulsvi
Aug 24 2017 08:49
she'd laugh too
(knowing I'm joking, of course)
iso
@iso1048
Aug 24 2017 08:49
ain't she a keeper haha
Gulsvi
@gulsvi
Aug 24 2017 08:49
lol
she's a keeper, but a rich spanish woman would be too
hmm....
well, I probably need more than a free code camp cert for that
iso
@iso1048
Aug 24 2017 08:50
you could always live the crazy life where you fly to and from span every month to be with each of them
Gulsvi
@gulsvi
Aug 24 2017 08:51
I need lots of euros for that :)
iso
@iso1048
Aug 24 2017 08:51
@SkyC0der not if you've got the rich spanish woman....
Gulsvi
@gulsvi
Aug 24 2017 08:51
I need a strategy now
iso
@iso1048
Aug 24 2017 08:53
@SkyC0der oh and i wanted you to use the watson api
Gulsvi
@gulsvi
Aug 24 2017 08:54
Watson API, Star Wars API, React...pomodoro, tic-tac-toe, and simon
Lots left to do :(
iso
@iso1048
Aug 24 2017 08:55
you don't need to tell me. I still want to do all that, learn app development, do online comp sci course, command line, angular2....
Gulsvi
@gulsvi
Aug 24 2017 08:55
I did the leaderboard in 15 lines, so going to have to be happy with that
iso
@iso1048
Aug 24 2017 08:55
@SkyC0der humble brag
Gulsvi
@gulsvi
Aug 24 2017 08:55
Yeah, so much to learn!
Not a very humble brag :)
Prideful brag :)
iso
@iso1048
Aug 24 2017 08:56
'did the leaderboard in 15 lines' = brag
'going to have to be happy with that' = humble
Gulsvi
@gulsvi
Aug 24 2017 08:56
lol, it was 25 lines a week ago, then 20, now got it down to 15
iso
@iso1048
Aug 24 2017 08:57
oh ok.
@SkyC0der so you gonna check in on the chat if you remember to or nah?
Gulsvi
@gulsvi
Aug 24 2017 09:02
yeah, definitely
@gothamknight
easy enough to check at https://gitter.im/FreeCodeCamp/HelpFrontEnd without even logging in
iso
@iso1048
Aug 24 2017 09:02
brilliant
ill still mention from time to time then haha
@SkyC0der ok some actual help. How can i make a conditional to check if an element has display:none? This was my attempt: if ($(idOfMenu).css('display')=='none')
Gulsvi
@gulsvi
Aug 24 2017 09:07
I forget how with jQuery
iso
@iso1048
Aug 24 2017 09:08
@SkyC0der how about with vanilla?
Gulsvi
@gulsvi
Aug 24 2017 09:09
I think it's $(".myDiv").css("display") == "none"; // true or false
in vanilla...hmmm
document.getElementById('myDiv').style.display === "none"
iso
@iso1048
Aug 24 2017 09:12
@SkyC0der yeah, a conditional does return true/false....? I am missing something.
@SkyC0der something to read on your travels (you'll know most of it already i guess): http://eloquentjavascript.net/Eloquent_JavaScript.pdf
Gulsvi
@gulsvi
Aug 24 2017 09:12
it looks right
but cofee wearing off 2am :)
That's a great book!
iso
@iso1048
Aug 24 2017 09:13
so you've already read bits of it then?
Gulsvi
@gulsvi
Aug 24 2017 09:13
Yes, it was the only book I tried to read when starting out
I gave up on it though
iso
@iso1048
Aug 24 2017 09:14
oh. any other book recommendations? (on any topic). i'm gonna try and get back into reading
Gulsvi
@gulsvi
Aug 24 2017 09:15
That's the only book I tried to read. The rest was MDN and jquery docs
iso
@iso1048
Aug 24 2017 09:15
by 'on any topic' i mean biographies, fiction....
heroiczero
@heroiczero
Aug 24 2017 09:15
@gothamknight https://github.com/getify/You-Dont-Know-JS try this if you want more books
Gulsvi
@gulsvi
Aug 24 2017 09:15
ahhh lol, all time favorite book is The River Why
iso
@iso1048
Aug 24 2017 09:16
@heroiczero i just bookmarked that today. thanks
CamperBot
@camperbot
Aug 24 2017 09:16
gothamknight sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1645 | @heroiczero |http://www.freecodecamp.com/heroiczero
Gulsvi
@gulsvi
Aug 24 2017 09:16
Don't watch the movie :)
iso
@iso1048
Aug 24 2017 09:16
@SkyC0der oh mate, (almost) anything but romance haha
Gulsvi
@gulsvi
Aug 24 2017 09:17
I'll bet that @flyfishingbarbara has read that book
iso
@iso1048
Aug 24 2017 09:17
why is that?
Gulsvi
@gulsvi
Aug 24 2017 09:17
Lots of fly fishing in the book :) but really it about a man with a plan, living on his own
Great read, lots of funy stories
I've read a ton of Jack Kerouac too, love his books
iso
@iso1048
Aug 24 2017 09:18
@SkyC0der i read paul allen's autobio a while back. it was good too.
Gulsvi
@gulsvi
Aug 24 2017 09:19
I've been meaning to read that
iso
@iso1048
Aug 24 2017 09:19
does bill gates have an autobio?
i want to read elon musk bio and jack ma bio's too
Gulsvi
@gulsvi
Aug 24 2017 09:20
The road ahead?
iso
@iso1048
Aug 24 2017 09:20
@SkyC0der let me tell you, paul allen should be more famous.
Gulsvi
@gulsvi
Aug 24 2017 09:20
Yeah, I think that's the one
iso
@iso1048
Aug 24 2017 09:21
@SkyC0der oh im definitely reading the bill gates bio. thanks. He was the visionary it appears - the guy with the ideas
CamperBot
@camperbot
Aug 24 2017 09:21
gothamknight sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:warning: gothamknight already gave skyc0der points
iso
@iso1048
Aug 24 2017 09:21
and bill was the guy that could make those ideas possible
Gulsvi
@gulsvi
Aug 24 2017 09:21
The backstabber according to steve jobs :P
iso
@iso1048
Aug 24 2017 09:21
more or less
@SkyC0der who? Paul Allen?
Gulsvi
@gulsvi
Aug 24 2017 09:22
all great bios to know
Bill gates
Steve vs. Bill in the early days
iso
@iso1048
Aug 24 2017 09:22
true.
Gulsvi
@gulsvi
Aug 24 2017 09:23
Pirates of Silicon Valley is a good movie if you can ever find it: https://en.wikipedia.org/wiki/Pirates_of_Silicon_Valley
My dad showed it to me. Glad I watched it
iso
@iso1048
Aug 24 2017 09:24
oh cool.
Gulsvi
@gulsvi
Aug 24 2017 09:24
Alright...bedtime :zzz: talk to you tomorrow :)
2:30 am
iso
@iso1048
Aug 24 2017 09:24
yeah bro. catch you later
Gulsvi
@gulsvi
Aug 24 2017 09:25
g'night, g'day, g'devening :)
iso
@iso1048
Aug 24 2017 09:25
ok truman
Boris Yordanov
@borisyordanov
Aug 24 2017 10:21
image.png
i can't make the indicators go under the menu
even though the menu and indicators are not position:static
any ideas?
heroiczero
@heroiczero
Aug 24 2017 10:24
@borisyordanov did you try flex and flex-direction: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Boris Yordanov
@borisyordanov
Aug 24 2017 10:25
@heroiczero the problem is z-index is not working, the indicators are in an entirely different html element, than the menu
heroiczero
@heroiczero
Aug 24 2017 10:26
@borisyordanov z-index determines what is on top of another like an text on top of an image. Is this what you want?
Boris Yordanov
@borisyordanov
Aug 24 2017 10:26
@heroiczero yes
heroiczero
@heroiczero
Aug 24 2017 10:27
could i see your code maybe I could work it out
Boris Yordanov
@borisyordanov
Aug 24 2017 10:27
i read the z-index doesn't work if the element is position:static, but that is not the cse here
@heroiczero it's a bootstrap nav and carousel. The indicators are from the carousel
heroiczero
@heroiczero
Aug 24 2017 10:29
@borisyordanov did you use position:relative or absolute?
Boris Yordanov
@borisyordanov
Aug 24 2017 10:29
@heroiczero i fixed it. I needed to apply the z-index to the top-most parent of the menu
@heroiczero thanks for helping though
CamperBot
@camperbot
Aug 24 2017 10:29
:star2: 1646 | @heroiczero |http://www.freecodecamp.com/heroiczero
borisyordanov sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
heroiczero
@heroiczero
Aug 24 2017 10:29
@borisyordanov :+1:
Pedro Silva
@pedrosilvahtml
Aug 24 2017 11:05
can anyone here help me get my twitter share quote button working for the random quote webpage challenge?
prakash chandra yadav
@prakashyadav008
Aug 24 2017 11:08
found a way to make the search box expand to the left
anyone with the same issue can look up
h1tag
@h1tag
Aug 24 2017 12:35
@pedrosilvahtml can you post a link to your project?
Pedro Silva
@pedrosilvahtml
Aug 24 2017 12:38
@h1tag sure, hope the link works, https://codepen.io/pedrosilva/pen/MvBwrd don't pay to much attention to the code to make the share button work, i've been trying various things to make it work.
Pedro Silva
@pedrosilvahtml
Aug 24 2017 12:46
hmm just noticed the website is not very responsive atm.. sorry about that
h1tag
@h1tag
Aug 24 2017 12:48
@pedrosilvahtml you forgot to add jQuery
Tanushree Samanta
@TSamanta
Aug 24 2017 13:36
how are udemy paid courseslike cole steele's or stepher grider's course
dinesh
@1532j0004kg
Aug 24 2017 14:29
how to use api?
in the programs?
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:38
hello
dinesh
@1532j0004kg
Aug 24 2017 14:38
hieeeeee....
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:38
can some one help me with
setInterval
and clearInterval?
dinesh
@1532j0004kg
Aug 24 2017 14:39
in js?
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:39
i want to use
setInterval
yes
I want to use
setInterval
clearInterval
and then setInterval
I need help with the pomodoro clock
project
dinesh
@1532j0004kg
Aug 24 2017 14:41
set interval sets the time every min...
clear interval stops the time...
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:41
and then i want to use
setInterval
again.
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:42
hello humans :)
Ken Haduch
@khaduch
Aug 24 2017 14:45
@Kowalatam - hello
dinesh
@1532j0004kg
Aug 24 2017 14:45
refer this...
hello @khaduch
Ken Haduch
@khaduch
Aug 24 2017 14:45
@1532j0004kg - hello
dinesh
@1532j0004kg
Aug 24 2017 14:45
what are u learning now
u know js...
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:46
Been a few days i have been here last...
could have finished my calculator by now :(
dinesh
@1532j0004kg
Aug 24 2017 14:46
ok
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:46
anyway.. whats going on here :)
dinesh
@1532j0004kg
Aug 24 2017 14:46
u know how to use api @Kowalatam ?
if u knew explain plzzz....
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:47
@1532j0004kg i'm unsure if i understand what u want me to explain..
how to use api ?
dinesh
@1532j0004kg
Aug 24 2017 14:48
yup....
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:48
hmmm... interesting question im unable to explain :(..
dinesh
@1532j0004kg
Aug 24 2017 14:49
then how did u finished the randomquote generator
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:49
but if u have something specific, i could lead u in the right direction or just wait for Sky or someone else lol, to explain it..
alpox
@alpox
Aug 24 2017 14:49
@1532j0004kg You usually use an API through ajax calls (web request)
dinesh
@1532j0004kg
Aug 24 2017 14:50
any examples? @alpox
alpox
@alpox
Aug 24 2017 14:50
Which urls to take and how to access the data which comes back is always different and specific to the endpoint
@1532j0004kg Well you did already if you made the jquery examples
$.getJSON(url, function(data) {
    console.log(data);
});
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:50
can someone
help me create
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:51
@1532j0004kg see.. all u had to do was wait... lol, someone is explaining it....
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:51
aa countdown timer
in canvas
in a canvas
alpox
@alpox
Aug 24 2017 14:51
This would be a request to an api with endpoint url and logs the result @1532j0004kg
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:51
i need help creating a countdown timer
in a canvas.
dinesh
@1532j0004kg
Aug 24 2017 14:51
ok thanks alpox....
alpox
@alpox
Aug 24 2017 14:51
@siddarthk123 Use setInterval as usual in javascript. Draw on each interval
dinesh
@1532j0004kg
Aug 24 2017 14:51
thanks alpox
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:51
@1532j0004kg i used api fo rthat
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:52
alpox
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:52
but can't explain it :)
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:52
the numbers just stack on top of each other.
alpox
can u show me how?
dinesh
@1532j0004kg
Aug 24 2017 14:52
can u plz post your pen @Kowalatam @alpox
with api...
alpox
@alpox
Aug 24 2017 14:53
we are not here to give solutions @1532j0004kg
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:54
alpox
dinesh
@1532j0004kg
Aug 24 2017 14:54
then broieeee?
Siddarth Krishnan
@siddarthk123
Aug 24 2017 14:54
can you show me how?
dinesh
@1532j0004kg
Aug 24 2017 14:57
What are all things we need to be a expert in program?
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:57
    $.ajax( {
    url: api_url,
    dataType: 'json',
    type: 'GET',
    success: function(data) {    
       // do something with data .... 
    }
} );
@1532j0004kg
dinesh
@1532j0004kg
Aug 24 2017 14:57
okieee
Elizabeth Paul
@Kowalatam
Aug 24 2017 14:57
something like that
dinesh
@1532j0004kg
Aug 24 2017 14:58
okieee
can u post full pen
Elizabeth Paul
@Kowalatam
Aug 24 2017 15:01
@1532j0004kg if u mean my random quote pen ... i'm ashamed of it .... :)...
dinesh
@1532j0004kg
Aug 24 2017 15:02
np ...if u can able to send it?
Elizabeth Paul
@Kowalatam
Aug 24 2017 15:02
but don't be like me who can use api and not explain lol.. try and get what it's all about... u ganna use a lot
dinesh
@1532j0004kg
Aug 24 2017 15:02
i know js
alpox
@alpox
Aug 24 2017 15:02
@1532j0004kg You don't learn much from that. Better try yourself and not with a solution of someone else
dinesh
@1532j0004kg
Aug 24 2017 15:03
but i have no idea to do in the projects...
alpox
@alpox
Aug 24 2017 15:03
@siddarthk123 you probably have to clear the canvas each time you draw the number
dinesh
@1532j0004kg
Aug 24 2017 15:03
thats why i am asking
alpox
@alpox
Aug 24 2017 15:03
@1532j0004kg Thats why you go through the learning stage :-)
@1532j0004kg You can gather your information you need from google, stackoverflow...
Elizabeth Paul
@Kowalatam
Aug 24 2017 15:04
yeah.. what @alpox said lol..
alpox
@alpox
Aug 24 2017 15:04
research is one of the biggest thing you have to be expert in
dinesh
@1532j0004kg
Aug 24 2017 15:04
I finished the tasks..
Elizabeth Paul
@Kowalatam
Aug 24 2017 15:04
@1532j0004kg just start somewhere first... in no time, everything will come together
dinesh
@1532j0004kg
Aug 24 2017 15:05
What are all things i need to do the projects
Siddarth Krishnan
@siddarthk123
Aug 24 2017 15:05
alpox
can i show you my code?
Elizabeth Paul
@Kowalatam
Aug 24 2017 15:06
@1532j0004kg i actually did mine without api..
just checked
i just put some random quotes from the internet in an array
and worked with that.. meant to go change it and use a simpson api someone posted in the forum
but haven't gotten around to do it
@1532j0004kg so u can do that or just settle down and learn how to use api cus u will still need it in the next project
alpox
@alpox
Aug 24 2017 15:11
@siddarthk123 You could either use your own layer for only the numbers, or you can make a function which draws all elements at once - and each interval elapse, you write there another number but also draw all other things behind
@siddarthk123 And please do not use a while loop in which you create a setinterval :D just use setinterval and a counter variable
Siddarth Krishnan
@siddarthk123
Aug 24 2017 15:21
alpox
can you show me what you mean/
alpox
@alpox
Aug 24 2017 15:22
@siddarthk123 I don't know how i would show that :D
function drawItAll(num) {
    ctx.clear();

    drawThis();
    drawThat();
    drawSomethingElse();
    drawCountdown(num);
}

var countdown = 10;
var interval = setInterval(function() {
    countdown--;
    if(countdown == 0)
        clearInterval(interval);
    drawItAll(countdown);
}, 1000);
Maybe something like that can help you for the overview
Siddarth Krishnan
@siddarthk123
Aug 24 2017 16:01
alpox
this is what i got so far
based on this
can you tell me what to do?
Emil
@aguyinmontreal
Aug 24 2017 16:14
Can someone tell me what is this Javascript code: var x = false | isIE; ?
TheTomboySarah
@TheTomboySarah
Aug 24 2017 16:30
image.png
can someone tell me where im wrong here?
Ken Haduch
@khaduch
Aug 24 2017 16:33
@aguyinmontreal - is there a little more context? basically it is using the result of a bitwise OR operation (the | operator) to set a value into variablex. But in this case false means that it would examine / use the value of isIE, which I'm assuming is a variable that is set somewhere (must be related to Internet Explorer?)
Nitin Chandran Nair
@NitinNair89
Aug 24 2017 16:34
@TheTomboySarah Add the other two classes - animated and shake to #target1 in your script
Elizabeth Paul
@Kowalatam
Aug 24 2017 16:35
@TheTomboySarah i couldn't find the target1 id on ur button
i think thats what is missing
it just says #target1.. but no id="target1"
Ken Haduch
@khaduch
Aug 24 2017 16:38
@TheTomboySarah - did you change the code for that first button? It should have the id="target1"attribute and value similar to the ones that follow it.
@TheTomboySarah - tagged the wrong person in the previous post. Make sure that you have the ID attribute on the first button with the value "target1"
Ken Haduch
@khaduch
Aug 24 2017 16:53
@aguyinmontreal - you can see the documentation on the Bitwise OR operator here)
Emil
@aguyinmontreal
Aug 24 2017 17:05
@khaduch my IDE says false | isIE can be simplified to isIE; is it true?
@khaduch thanks
CamperBot
@camperbot
Aug 24 2017 17:06
aguyinmontreal sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3236 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 24 2017 17:06
@aguyinmontreal - it seems that that would be the case? I'm not sure if there is anything tricky about this, like some javascript funny business going on. But it seems that in this case the false is not going to have an impact?
Emil
@aguyinmontreal
Aug 24 2017 17:08
@khaduch yeah, I'm not sure either
alpox
@alpox
Aug 24 2017 17:14
@aguyinmontreal the bit representation of false is the same as for 0. If you bitwise OR it with something else, it simply does nothing. Only the other thing takes effect
I mean (0 | x) === x (If x is a number) to be precise :D
@siddarthk123 I still see your old pen
Jorge
@OrangeKulture
Aug 24 2017 17:19
hey wazzup guys
Ken Haduch
@khaduch
Aug 24 2017 17:23
@OrangeKulture - hey there... how are you doing today?
Jorge
@OrangeKulture
Aug 24 2017 17:24
@khaduch hey ken .. doing good thanks, how about you?
CamperBot
@camperbot
Aug 24 2017 17:24
orangekulture sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3237 | @khaduch |http://www.freecodecamp.com/khaduch
Ken Haduch
@khaduch
Aug 24 2017 17:32
I'm doing okay, too - thanks for asking... How are the projects going? Have a great afternoon @OrangeKulture
Jorge
@OrangeKulture
Aug 24 2017 17:35
its going good! doing a lot of angular lately, have to finish tic tact toe to get the cert, really should .. procrastinating a lot hah .. and thanks.. you too!
Ken Haduch
@khaduch
Aug 24 2017 17:58
@OrangeKulture - well, I'm bogged down on a couple things, somewhat a lack of motivation and other things taking too much time. I should try to get things rolling again and see if I can close out some of the projects. I have a lot of them in "sandbox" mode - playing around to get the feel for doing them but not really focusing on them... short attention span and lots of other things to do, too! Once of these days... :)
Jorge
@OrangeKulture
Aug 24 2017 18:09
yeah i know the feeling haha ..
sooou ... i guess the chat is a lil slow
Victor Abeledo
@victorja
Aug 24 2017 18:11
Guys do you know how can I add space between my img and the div? I tried vertical-align: center and changing margin-top /bottom but neither of them work
https://codepen.io/victorabeledo/pen/prNOGM
Gulsvi
@gulsvi
Aug 24 2017 18:16
@victorja margin-top seems to work for me - which div?
Victor Abeledo
@victorja
Aug 24 2017 18:17
I tried with img-div and img-caption @SkyC0der
Gulsvi
@gulsvi
Aug 24 2017 18:18
The version of bootstrap you are using comes with spacing utilities: https://v4-alpha.getbootstrap.com/utilities/spacing/
Adding mt-4 (for example) as a class will give margin-top: 1.5rem
<p id="img-caption" class="mt-4">Doctor Favaloro at his medical practice in Argentina.</p>
Victor Abeledo
@victorja
Aug 24 2017 18:18
I want to make space between the image itself (img-caption) and img-div, not between img-caption and the main div
Gulsvi
@gulsvi
Aug 24 2017 18:19
You can add the spacing utility classes to any divs - above is an example
just1witness
@just1witness
Aug 24 2017 18:20
How do I convert
["ONE HUNDRED, 100","TWENTY, 20","TWENTY, 20","TWENTY, 20","QUARTER, 0.25","QUARTER, 0.25"]
to
["ONE HUNDRED", 100], ["TWENTY", 60.00],["QUARTER", 0.50]]?
Gulsvi
@gulsvi
Aug 24 2017 18:20
@just1witness You could convert it to an object, then back to an array
Victor Abeledo
@victorja
Aug 24 2017 18:20
@SkyC0der It works but not for the margin-top
just1witness
@just1witness
Aug 24 2017 18:21
K, will try now. @SkyC0der
Gulsvi
@gulsvi
Aug 24 2017 18:25
@victorja It works for me - maybe I'm misunderstanding what you are trying to do?
Victor Abeledo
@victorja
Aug 24 2017 18:27
I'll try to explain it in a better way: I want a space between the image and the background color of its div, because right now the image has no margin between it and the div background
Gulsvi
@gulsvi
Aug 24 2017 18:28
I think you mean padding
@victorja use the class p-3 on your image
class="img img-fluid p-3"
change the number for more or less padding
Victor Abeledo
@victorja
Aug 24 2017 18:29
maybe that's the word for it, sorry english isn't my first language. I ll try that
juni
@junipberry
Aug 24 2017 18:30
hi Sky
Gulsvi
@gulsvi
Aug 24 2017 18:30
Hello Juni
juni
@junipberry
Aug 24 2017 18:30
:)
How is your week going
Victor Abeledo
@victorja
Aug 24 2017 18:30
@SkyC0der thank you!
CamperBot
@camperbot
Aug 24 2017 18:30
victorja sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2555 | @skyc0der |http://www.freecodecamp.com/skyc0der
Gulsvi
@gulsvi
Aug 24 2017 18:30
Busy :) how about you?
@victorja de nada! :)
juni
@junipberry
Aug 24 2017 18:31
not too busy lol
Victor Abeledo
@victorja
Aug 24 2017 18:31
:smile:
juni
@junipberry
Aug 24 2017 18:31
I’m working on some more problems and got stuck again lol would you mind helping
Gulsvi
@gulsvi
Aug 24 2017 18:32
I'm happy to try
hope I can help
juni
@junipberry
Aug 24 2017 18:32
ty :D
so the directions are:
Given two objects and a key, "addObjectProperty" sets a new property on the 1st object at the given key. The value of that new property is the entire 2nd object.
and so I simply wrote:
function addObjectProperty(obj1, key, obj2) {
  obj1.key = obj2;
  return obj1;
}
is there more to this problem than i am seeing
Gulsvi
@gulsvi
Aug 24 2017 18:34
That looks right - the wording is a little confusing
"A new property at the given key"
juni
@junipberry
Aug 24 2017 18:34
yes, it is isnt it! Had to re-read few times..
this is the example is gives:
var person1 = {
  name: 'Joe Blow',
  role: 'schlub'
};
var person2 = {
  name: 'Mr. Burns',
  role: 'supervisor'
};
addObjectProperty(person1, 'manager', person2);
console.log(person1.manager); // --> { name: 'Mr. Burns', role: 'supervisor’ }
*it gives
Gulsvi
@gulsvi
Aug 24 2017 18:37
@junipberry It should be obj1[key] = obj2;
not obj1.key
The example helps it make a little more sense
just1witness
@just1witness
Aug 24 2017 18:38
@SkyC0der thanks couldn't figure it our, but thanks anyways
CamperBot
@camperbot
Aug 24 2017 18:38
just1witness sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2556 | @skyc0der |http://www.freecodecamp.com/skyc0der
juni
@junipberry
Aug 24 2017 18:39
oh how come sometimes I need to do [] instead of . when calling a key
thought they were interchangeable
Łukasz Sobek
@lukaszsobek
Aug 24 2017 18:40
@junipberry sometimes you cannot interchange, e.g. you can't go arr.2 you have to go arr[2]
you can't go arr.this is a test, you must go arr["this is a test"]
Gulsvi
@gulsvi
Aug 24 2017 18:40

@just1witness It would be something like:

var arr = [["ONE HUNDRED", 100],["TWENTY", 20],["TWENTY", 20],["TWENTY", 20],["QUARTER", 0.25],["QUARTER", 0.25]]
var combined = {};

arr.forEach(v => (combined[v[0]] = +(combined[v[0]] + v[1]).toFixed(2) || v[1]));

var result = Object.keys(combined).map(v => [v, combined[v]]);
console.log(result); // [["ONE HUNDRED", 100], ["TWENTY", 60], ["QUARTER", 0.5]]

(but you'll need to change the code or the array to work with that)

@junipberry [brackets] are required for variables
key is a variable
juni
@junipberry
Aug 24 2017 18:41
well isn’t that bc in the first instance, it is a index. And in the second instance, it is a string. @lukaszsobek
ahh right, ty @SkyC0der
CamperBot
@camperbot
Aug 24 2017 18:42
junipberry sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2557 | @skyc0der |http://www.freecodecamp.com/skyc0der
Raymond Berger
@RayBB
Aug 24 2017 18:43
Hello, can anyone help me debug this? It works fine when I run i tin Jscomplete.com/repl but for some reason not in codepen. I have babel turned on but it just doesn't wanna work.
juni
@junipberry
Aug 24 2017 18:43
@sky, have you heard of fizzbuzz?
Gulsvi
@gulsvi
Aug 24 2017 18:44
Yes @junipberry but I haven't tried it
the algorithm
Also sounds like a drink for some reason
juni
@junipberry
Aug 24 2017 18:45
I have and am looking over several popular ways abt it. One way Im not seeing if its right. Can you take a look and can we talk it over.
just1witness
@just1witness
Aug 24 2017 18:45
Oh, thank you, I'll take a look. After three days, I have the correct answers for all the exact change scenarios, but the wrong format. :)
My eyes are sick of looking at it
juni
@junipberry
Aug 24 2017 18:45
lol it does sound like a drink..a fizzy alcoholic one
Gulsvi
@gulsvi
Aug 24 2017 18:45
uggh, I don't blame you @just1witness it's the only one left for me to do now
just1witness
@just1witness
Aug 24 2017 18:47
@SkyC0der it's a toughy. Maybe when it comes time, I can help you! Haha! (I'm just kidding, my code is ridiculous. I'll have to watch tutorials to learn how to do it right, after I get it to work.
juni
@junipberry
Aug 24 2017 18:47
this one was the third popular answer type, and this person said they incorporated C# elements.
function FizzBuzz(aTarget) {
    for (var i = 1; i <= aTarget; i++) {
        var result = "";
        if (i%3 === 0) result += "Fizz";        
        if (i%5 === 0) result += "Buzz";
        if (result.length ===0) result = i;

        console.log(result);
    }
}
But I’m not seeing any code for divisible by 3 and 5
Gulsvi
@gulsvi
Aug 24 2017 18:49
i % 3 === 0 means it's divisible by 3
i % 5 === 0 means divisible by 5
Shadow Walker
@khashy
Aug 24 2017 18:49
hey guys is there anything wrong with my code?
juni
@junipberry
Aug 24 2017 18:50
yes, but there needs to be an instance where it is i%3 and i%5
to create fizzbuzz
Jan Shah
@JanShah
Aug 24 2017 18:50
@RayBB a lot of syntax errors..
juni
@junipberry
Aug 24 2017 18:50
oh you know what.. its fine that post was incomplete
Gulsvi
@gulsvi
Aug 24 2017 18:51
oh, I see
juni
@junipberry
Aug 24 2017 18:51
I was wondering how that solved it in that state
Shadow Walker
@khashy
Aug 24 2017 18:51
var W = $('#part1').width();
    $(window).resize(function() {
        if (W < 455) {
            $('#part1 > #Spic').css({
                marginRight: 'auto',
                marginLeft: 'auto'
            });
        }
    });
    alert(W);
});
Gulsvi
@gulsvi
Aug 24 2017 18:51
It outputs "FizzBuzzz" when it divisible by both 3 and 5?
juni
@junipberry
Aug 24 2017 18:51
guess make a i%15 on top and do else if below for the rest of the options
Moisés Man
@moigithub
Aug 24 2017 18:52
15 should output FizzBuzz
with that same code
juni
@junipberry
Aug 24 2017 18:52
yup ty
Gulsvi
@gulsvi
Aug 24 2017 18:53
yeah, no need to add more if statements
Jan Shah
@JanShah
Aug 24 2017 18:53
@RayBB have you got the link where it is working?
Gulsvi
@gulsvi
Aug 24 2017 18:54
@khashy It should be:
            $('#part1 > #Spic').css({
                'margin-right': 'auto',
                'margin-left': 'auto'
            });
I think you could also do this, as long as they are strings:
            $('#part1 > #Spic').css({
                'marginRight': 'auto',
                'marginLeft': 'auto'
            });
never mind, I guess it works without quotes too...
Raymond Berger
@RayBB
Aug 24 2017 19:02
@JanShah Sorry my notifications weren't popping up. I don't have an account for JS Complete but the exact code works perfectly on there. What syntax errors do you see?

The only difference is change the last line to

ReactDOM.render( <App />, mountNode);

alpox
@alpox
Aug 24 2017 19:03

@junipberry A bit more concise:

for(var i = 1; i <= 100; i++) {
 var fz = "";
 if(!(i % 3)) fz += "Fizz";
 if(!(i % 5)) fz += "Buzz";
 console.log(fz || i);
}

:D works only in javascript though

Gulsvi
@gulsvi
Aug 24 2017 19:06
Or :)
for (var i = 0; i <= 100;) console.log((++i % 3 ? "" : "Fizz") + (i % 5 ? "" : "Buzz") || i);
alpox
@alpox
Aug 24 2017 19:06
@SkyC0der I don't think that gives you the job :D
Renan Teixeira Ferraz
@RTFerraz
Aug 24 2017 19:07
Hello there
Gulsvi
@gulsvi
Aug 24 2017 19:07
Unless the job is writing fizzbuzz one-liners lol @alpox
Jan Shah
@JanShah
Aug 24 2017 19:07
@RayBB errors start from the game function. I don't understand your syntax tbh, why static instead of a function for example? the built in methods in react will do everything you need but a lot cleaner code
Lorrie Pearson
@Lorrie01
Aug 24 2017 19:07
Hi @RTFerraz
Renan Teixeira Ferraz
@RTFerraz
Aug 24 2017 19:07
Hi @Lorrie01
I need help with the project
Lorrie Pearson
@Lorrie01
Aug 24 2017 19:08
what project are you working on @RTFerraz
Renan Teixeira Ferraz
@RTFerraz
Aug 24 2017 19:09
I'm working on Random Quote machine
Lorrie Pearson
@Lorrie01
Aug 24 2017 19:09
what issue are you having with the Random Quote Machine @RTFerraz
Renan Teixeira Ferraz
@RTFerraz
Aug 24 2017 19:09
and trying to figure out how to create a tweet button @Lorrie01
@Lorrie01
Lorrie Pearson
@Lorrie01
Aug 24 2017 19:11
this is the resourse I used when I created my Random Quote machine...https://dev.twitter.com/web/tweet-button
I was able to customize the tweets to share each individual quote once I reviewed the the info @RTFerraz https://dev.twitter.com/web/tweet-button
Jan Shah
@JanShah
Aug 24 2017 19:11
I rewrote some but I think you should rewrite it as simple functions in the react class and set the initial state in the constructor
//i.e.
class Game extends React.Component {
  constructor()
  {
    super()
    this.state={
      selectedNumbers: [],
      randomNumberOfStars: Game.randomNumber(),
      usedNumbers: [],
      answerIsCorrect: null,
      redraws: 5,
      doneStatus: null
    }
  }
  randmomNumber(){return 1 + Math.floor(Math.random()*9)}
    // static randomNumber = () => 1 + Math.floor(Math.random()*9)
  ...
@RayBB
Renan Teixeira Ferraz
@RTFerraz
Aug 24 2017 19:13
thnx @Lorrie01, I'll take a look
Raymond Berger
@RayBB
Aug 24 2017 19:13
@JanShah I was following a tutorial working on this. I don't know why they did it in such a strange way
alpox
@alpox
Aug 24 2017 19:13
@SkyC0der Hahaha that would be a fun job :D
Lorrie Pearson
@Lorrie01
Aug 24 2017 19:13
you're welcome @RTFerraz
Jan Shah
@JanShah
Aug 24 2017 19:15
@RayBB Im baffled.. how old is the tutorial?
Jan Shah
@JanShah
Aug 24 2017 19:17
@RayBB I was wondering about underscore too, it's not been added as a dependency but is used in the app
Raymond Berger
@RayBB
Aug 24 2017 19:18
Ahh yeah underscore is built into the environment that they were using. I added it to codepen manually
Jan Shah
@JanShah
Aug 24 2017 19:20
@RayBB it's not in there mate, if you remove <Game /> and replace it with a string, errors out with _ not defined
I can't see the course unfortunately, I don't know what they guy's teaching.
Siddarth Krishnan
@siddarthk123
Aug 24 2017 19:33
i need help
checking
whether the mouse is within the range of shape
drawn in the canvas
can someone help me with that?
Raymond Berger
@RayBB
Aug 24 2017 19:40
@JanShah thanks to your suggestion I'm rewriting with the standard syntax and I think I'll learn more this way
CamperBot
@camperbot
Aug 24 2017 19:40
raybb sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 486 | @janshah |http://www.freecodecamp.com/janshah
Roxroy
@roxroy
Aug 24 2017 19:40
@siddarthk123 , To check whether it is inside you will have to call function that take the current cursor point and check whether it is inside the geometry of the shape. Here is an example to check if the pointer is within a circle.
Colin
@finkbeca
Aug 24 2017 19:43
Hi everyone I was wondering if some one could help me completely center the spans so there is a equal amount of space on each side. I've been messing around for quite a while with no success. Thanks https://codepen.io/buddyfinkbear/pen/YxjxMy
Jan Shah
@JanShah
Aug 24 2017 19:45
@finkbeca are you open to using bootstrap?
Eric Weiss
@eweiss17
Aug 24 2017 19:45
@finkbeca i solved it easily with flexbox
Colin
@finkbeca
Aug 24 2017 19:47
@JanShah No. I know I could. I was just wondering if you could do it otherwise
Ross Scarborough
@SourceHorse
Aug 24 2017 19:47
is anyone good with vanilla js api requests?
Colin
@finkbeca
Aug 24 2017 19:48
@eweiss17 Thanks do you know if there are any other ways to solve it?
CamperBot
@camperbot
Aug 24 2017 19:48
finkbeca sends brownie points to @eweiss17 :sparkles: :thumbsup: :sparkles:
:cookie: 593 | @eweiss17 |http://www.freecodecamp.com/eweiss17
Jan Shah
@JanShah
Aug 24 2017 19:48
it's a bit more work, let me have a look @finkbeca
Ross Scarborough
@SourceHorse
Aug 24 2017 19:48
i'm doing the twitch project and came up with this. can you check and let me know if it's okay?
Eric Weiss
@eweiss17
Aug 24 2017 19:48
you don't like flexbox?
Ross Scarborough
@SourceHorse
Aug 24 2017 19:48
just the api call
i set it to false to make it non-asynchronous
is this a really inefficient way to do it?
Siddarth Krishnan
@siddarthk123
Aug 24 2017 19:49
can someone teach me
Colin
@finkbeca
Aug 24 2017 19:49
@eweiss17 No flexbox is nice and I like using it., but I also know there must be other ways to accomplish it and having multiple tools is always nice :)
Siddarth Krishnan
@siddarthk123
Aug 24 2017 19:49
how to get mouselcick within a circle
like explain it to me?
Eric Weiss
@eweiss17
Aug 24 2017 19:50
well you could probably do it with just math and percentages....
juni
@junipberry
Aug 24 2017 19:51
hey sky
how does this look to you. I’m trying to merge the two arrays.
function joinArrays(arr1, arr2) {
  array.prototype.push.apply(arr1, arr2);
return array;

}
CuttureSync
@culturesync
Aug 24 2017 19:52
Looking for some opinions on this code pen - It's still in the works. It's not completely responsive for mobile etc... still working out how and where to do transitions/animations for the media queries... Thanks and lemme know
https://codepen.io/culturesync/full/brMwgo/
Colin
@finkbeca
Aug 24 2017 19:52
@eweiss17 Currently using percentages
Jan Shah
@JanShah
Aug 24 2017 19:52
@finkbeca
//css
body {
  background: #ccc;
}

.row {
  width:100%;
}

.col {
  width:400px;
  margin: auto
}

.text-center{
  text-align: center
}

.text {
  width:80px;
  float:left;
  padding-top:10px;
  padding-bottom:10px;
  background: white;
  margin:10px
}

//html

<div class="row text-center">
  <div class="col">
  <div class= 'text'>9</div>
  <div class= 'text'>02</div>
  <div class= 'text'>17</div>
  <div class= 'text'>12:00 </div>
  </div>
</div>
Eric Weiss
@eweiss17
Aug 24 2017 19:53
@finkbeca imo once you discover all that flexbox can do, there is no reason to go back
Jan Shah
@JanShah
Aug 24 2017 19:54
@eweiss17 grid-css
Colin
@finkbeca
Aug 24 2017 19:54
@eweiss17 Wouldn't you like to know multiple ways to solve a problem that is one of the best things about coding imo.
Eric Weiss
@eweiss17
Aug 24 2017 19:55
seems similar to flexbox
Colin
@finkbeca
Aug 24 2017 19:55
@JanShah would the way your showing work with spans instead of divs?
Jan Shah
@JanShah
Aug 24 2017 19:55
@finkbeca seems to
yep, it does
Colin
@finkbeca
Aug 24 2017 19:55
@JanShah k thanks a bunch I'll play around with it
CamperBot
@camperbot
Aug 24 2017 19:55
finkbeca sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 487 | @janshah |http://www.freecodecamp.com/janshah
Eric Weiss
@eweiss17
Aug 24 2017 19:56
@JanShah did you just bootstrap grid
Jan Shah
@JanShah
Aug 24 2017 19:56
no, why? @eweiss17
would have been simpler to, just used the same naming conventions
Eric Weiss
@eweiss17
Aug 24 2017 19:57
just looks like it because of row and col
cameron nicklaus
@camnicklaus
Aug 24 2017 20:01
anybody good with ios events and form field navigation? apparently I'm not :-(
Barbara Pentoney
@flyfishingbarbara
Aug 24 2017 20:02
@SkyC0der hi sky...are you awake after chatting bout books till 2am...hahaha?
alpox
@alpox
Aug 24 2017 20:02
@camnicklaus form field navigation? thats a thing? :/
thinsoldier
@thinsoldier
Aug 24 2017 20:02
On a resumé, what's the best way to say I build responsive web designs but I do not design web designs.
Eric Weiss
@eweiss17
Aug 24 2017 20:03
Front End Developer experience?
cameron nicklaus
@camnicklaus
Aug 24 2017 20:03
@alpox well...at least in some sense ;) I'm trying to move focus from one input to the next on some kind of event...to no avail
Raymond Berger
@RayBB
Aug 24 2017 20:05
@JanShah how would I convert this to be without an arrow function?
resetGame = () => { this.setState( Game.initialState() ); };
When I change it to resetGame()function{ it's not binding 'this' correctly
Jan Shah
@JanShah
Aug 24 2017 20:08
@RayBB I was thinking about a way to do that. because I couldn't get the app running I didnt see if it worked but
//inside constructor
super()
this.reset = {'your initial state'}
...
//in function 
resetGame(){
  this.setState(this.reset)
}
CuttureSync
@culturesync
Aug 24 2017 20:08
@finkbeca are you attempting to keep the item centered at all times
within the div
Jan Shah
@JanShah
Aug 24 2017 20:10

@RayBB if you want to call resetgame should be in the form

this.resetGame.bind(this)
//or
in constructor
this.resetGame = this.resetGame.bind(this)
//function

onClick={this.resetGame}
//or on whatever event

I think

Jorge
@OrangeKulture
Aug 24 2017 20:11
@junipberry try using concat
Raymond Berger
@RayBB
Aug 24 2017 20:12
@JanShah what is that called? I'd like to read more on why that is?
alpox
@alpox
Aug 24 2017 20:12
@camnicklaus Thats a focus change :D
Jorge
@OrangeKulture
Aug 24 2017 20:13
@culturesync looks good! why not run a script to hide the image if the device width is less than x? that'll probs help you out
Barbara Pentoney
@flyfishingbarbara
Aug 24 2017 20:13
@SkyC0der I remember at some point looking into book but don't think I read it...when I give casting lessons I get a lot of 'river runs through it' references from my clients.... I did take a casting lesson from the guy that doubled for brad pitt - the scene where brad pitt is casting off of rock in middle of stream... fun... chat with you soon...
Jan Shah
@JanShah
Aug 24 2017 20:13
@RayBB what is what called mate?
binding?
hello guys
i'm trying to make it so that my footer stays on the bottom
Raymond Berger
@RayBB
Aug 24 2017 20:15
@JanShah yeah I guess that's what I was asking. I guess I'm just confused on why you need to do the this.resetGame = this.resetGame.bind(this) bit
lawrencelee93
@lawrencelee93
Aug 24 2017 20:15
:'(
yet i don't want it to be fixed
Ross Scarborough
@SourceHorse
Aug 24 2017 20:16
because of lack of iOS support?
CuttureSync
@culturesync
Aug 24 2017 20:16
@OrangeKulture okay, so hide the "logo" within my media queries too then :) :thumbsup:
Jan Shah
@JanShah
Aug 24 2017 20:17
@RayBB react runs all functions so if you don't bind it to an event it will run, problems start when you attach an unbound function to an event handler, it will just run anyway
if I bind to the constructor, it's usually because I want to use the function in another react class, so I can pass props without using bind(this) when passing
otherwise I bind to the button or event handler
cameron nicklaus
@camnicklaus
Aug 24 2017 20:19
@alpox well, now that that's cleared up...do you have any thoughts on what event to use in order to focus change to the next field on enter? I've got jquery and jquery mobile loaded and have tried binding 'change', 'tap', 'keydown', 'keypress' and maybe a few others...nothing seems to work. I wonder if maybe codepen is fouling it up somehow
Jorge
@OrangeKulture
Aug 24 2017 20:20
@culturesync just an idea .. looks good tho!
Jan Shah
@JanShah
Aug 24 2017 20:20
@camnicklaus I know, you can set field order and focus() in javascript to skip to any box you wan
cameron nicklaus
@camnicklaus
Aug 24 2017 20:22
@JanShah yeah, It's working on desktop os, just not on ios.
Jan Shah
@JanShah
Aug 24 2017 20:23
if only I had an iphone :(
cameron nicklaus
@camnicklaus
Aug 24 2017 20:23
@JanShah heheh...if only
Manuel Reyes
@Androbat
Aug 24 2017 20:23
@Manish-Giri Thanks
CamperBot
@camperbot
Aug 24 2017 20:23
androbat sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6459 | @manish-giri |http://www.freecodecamp.com/manish-giri
Eric Weiss
@eweiss17
Aug 24 2017 20:24
@lawrencelee93 if you look at your html, it doesn't expand the whole width of the page
whole height*
Eric Weiss
@eweiss17
Aug 24 2017 20:24
html.PNG
cameron nicklaus
@camnicklaus
Aug 24 2017 20:25
@JanShah it also works in chromes mobile emulator although i get a strange error in the console
Eric Weiss
@eweiss17
Aug 24 2017 20:25
@lawrencelee93 so that footer thinks its on the bottom
it seems like the height is not adjusting when you resize the window
cameron nicklaus
@camnicklaus
Aug 24 2017 20:26
@JanShah oooh, that looks like it could help... thanks!
CamperBot
@camperbot
Aug 24 2017 20:26
camnicklaus sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 488 | @janshah |http://www.freecodecamp.com/janshah
cameron nicklaus
@camnicklaus
Aug 24 2017 20:26
@JanShah apparently I'm also terrible at searching stackoverflow
CuttureSync
@culturesync
Aug 24 2017 20:27
@OrangeKulture I went ahead and added your suggestion and it flows better
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:27
@eweiss17 hi.. i kinda missed seeing u here .... how are you ?.. lol...
Eric Weiss
@eweiss17
Aug 24 2017 20:29
@Kowalatam been on vacation... bout to start college again though
can someone help me w/ this one
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:31
@eweiss17 u said again ?.. how ..
lol
Eric Weiss
@eweiss17
Aug 24 2017 20:32
like i didn't have school during summer
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:32
@eweiss17 i just came to my senses lol
:)
iso
@iso1048
Aug 24 2017 20:32
@eweiss17 what do you study bro?
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:33
and answered the question i asked..
Eric Weiss
@eweiss17
Aug 24 2017 20:33
Computer Science and Engineering
iso
@iso1048
Aug 24 2017 20:34
awesome
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:35
@BrianCodes33 u could create an array, loop through the first argument add and push to the array and muply the next.. i think, havn't done codewars... :)
Eric Weiss
@eweiss17
Aug 24 2017 20:35
codewars is pretty tough i was trying it out couple weeks ago
Gulsvi
@gulsvi
Aug 24 2017 20:35
@flyfishingbarbara yes, wide awake now! Sorry to tag you - was delirious from being up so late lol
Eric Weiss
@eweiss17
Aug 24 2017 20:37
oh my bad i was doing code fights
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:37
@eweiss17 have seen ppl here posting questions from there ...
Jan Shah
@JanShah
Aug 24 2017 20:37
@eweiss17 codewars is awesome when you have reasonable javascript experience, when you complete a kata and compare with your peers.. I'm always amazed how good some of the coders are
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:37
ohhh..
Jan Shah
@JanShah
Aug 24 2017 20:37
actually there are loads of other languages in codewars, but I've only done javascript katas
Eric Weiss
@eweiss17
Aug 24 2017 20:38
what is difference between code fights and code war then lol
Jorge
@OrangeKulture
Aug 24 2017 20:38
@culturesync awesome stuff
Jan Shah
@JanShah
Aug 24 2017 20:39
@eweiss17 layout and ui, they're both kata related
@eweiss17 doesn't codefights let you challenge other players live?
Elizabeth Paul
@Kowalatam
Aug 24 2017 20:40
@eweiss17 i don't know the difference but i know they both have something in common.... i haven't done any :)
Gulsvi
@gulsvi
Aug 24 2017 20:47
codefights is a race against others to solve the problem I think
codewars, just do it on your own time - team up with others
@BrianCodes33 I think for that problem you need to get all factors of the multiply number, then see which of those add up to the sum
Brian
@BrianCodes33
Aug 24 2017 21:04
i am still confused
CuttureSync
@culturesync
Aug 24 2017 21:07
I need someone to shed some light on targeting smooth scrolling with JS
my CodePen
This way when the screen is smaller and you click on the li link in the header menu and footer menu it will smooth scroll you to the page. I am thinking I can just add to the JS I already have set up for both the header menu and footer menu to target the paged for smooth scroll
Tom
@moT01
Aug 24 2017 21:13
im not sure what you are trying to accomplish, smooth scroll to where?
Brian
@BrianCodes33
Aug 24 2017 21:16
did you just give me the answer ?
hope not haha
CuttureSync
@culturesync
Aug 24 2017 21:17
So when you shrink the screens the main content of the page gets pushed down. So i am looking to target the .container class (which is my main body) for smooth scroll so when you click the li links in the menu (when screen is smaller and .container class is pushed down) it will smooth scroll you down to the .container area where all the main content for that "page" is.
@moT01
Gulsvi
@gulsvi
Aug 24 2017 21:17
@BrianCodes33 What do you need help with on that problem?
Brian
@BrianCodes33
Aug 24 2017 21:19
just confused how to problem solve it from scratch.
Tom
@moT01
Aug 24 2017 21:19
@culturesync so you mean the screen is so small that the header/nav fills more than the whole screen
Gulsvi
@gulsvi
Aug 24 2017 21:20
@BrianCodes33 I don't know where to begin helping - can you be more specific?
i pulled some code from there, worked
Gulsvi
@gulsvi
Aug 24 2017 21:21
You have to find two numbers that equal sum when added and multiply when multiplied.
iso
@iso1048
Aug 24 2017 21:21
@BrianCodes33 you could begin by creating an array which contains the multiples of multiply
CuttureSync
@culturesync
Aug 24 2017 21:22
@moT01 cool i'll check it out
Gulsvi
@gulsvi
Aug 24 2017 21:24
Happy to see what I can do to help, but I'm not very good at walking people through JS problems. That's why I don't hang out in the JS room too much :p
CuttureSync
@culturesync
Aug 24 2017 21:27
:point_up: August 24, 2017 2:19 PM
@moT01 YES I did mean that. Also it didn't work for my site. I already have code written in my JS area and i'm having trouble integrating the targeted smoothScroll to the code I already have
Tom
@moT01
Aug 24 2017 21:27
@BrianCodes33 still looking for help?
Brian
@BrianCodes33
Aug 24 2017 21:27
My algorithmic problem solving skills are pretty weak.
So when I just get a solution, although I appreciate it, it takes me a while to understand how you solved the problem
Tom
@moT01
Aug 24 2017 21:30
@culturesync lemme see if i can get it
Brian
@BrianCodes33
Aug 24 2017 21:31
although now i’m understanding your solution @SkyC0der
CuttureSync
@culturesync
Aug 24 2017 21:31
here is the code I have
  $(".menu a").on("click", function(e) {
    e.preventDefault();
    ele = this;
    changeClass(ele);
  });
  $(".footer-menu a").on("click", function(e) {
    e.preventDefault();
    ele = this;
    changeClass(ele);
  });
Brian
@BrianCodes33
Aug 24 2017 21:31
what does “brute force” mean ?/
Mercy Manrique
@mers89
Aug 24 2017 21:31
I need help with adding padding to my divs. I had used the padding-top: 5%; for 3 divs inside a container but no luck. I only want the divs to have the padding and not the container
CuttureSync
@culturesync
Aug 24 2017 21:32
I'm thinking that all I have to do is add smoothScroll animation to this
Tom
@moT01
Aug 24 2017 21:32
  $('.menu a').click(function(){
    $('html, body').animate({
      scrollTop: $('.container').offset().top
    }, 500);
  });
Brian
@BrianCodes33
Aug 24 2017 21:32
@mers89 on what class did you add the padding? styling a container if it’s bootstrap is usually bad practice.
Gulsvi
@gulsvi
Aug 24 2017 21:32
brute force means checking every combination instead of doing something more elegant, like taking a mathematical approach
Brian
@BrianCodes33
Aug 24 2017 21:33
ahh i see. still learning this terminology still a noob
Mercy Manrique
@mers89
Aug 24 2017 21:33
@BrianCodes33 it was on my css
Gulsvi
@gulsvi
Aug 24 2017 21:33
There are some solutions that involve looking at square roots
Brian
@BrianCodes33
Aug 24 2017 21:34
@mers89 can you be more specific? if you paste a snippet of your code i might be able to help.
CuttureSync
@culturesync
Aug 24 2017 21:34
@moT01 Thank you. I don't know anything about JS yet really, so this really helped.
CamperBot
@camperbot
Aug 24 2017 21:34
culturesync sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 809 | @mot01 |http://www.freecodecamp.com/mot01
Tom
@moT01
Aug 24 2017 21:35
@culturesync check out the javascript challenges at freecodecamp.org
Mercy Manrique
@mers89
Aug 24 2017 21:36
@BrianCodes33 Its on my github. https://mers89.github.io/wikipedia-api/
Brian
@BrianCodes33
Aug 24 2017 21:36
@SkyC0der right and brute forcing could mean slowing down time complexity?
Gulsvi
@gulsvi
Aug 24 2017 21:36
Yes, exactly @BrianCodes33
Complexity is often described in Big O Notation: https://en.wikipedia.org/wiki/Big_O_notation
Brian
@BrianCodes33
Aug 24 2017 21:36
thanks @SkyC0der now it makes sense why being good at math can be beneficial to programming haha
CamperBot
@camperbot
Aug 24 2017 21:36
briancodes33 sends brownie points to @skyc0der :sparkles: :thumbsup: :sparkles:
:star2: 2558 | @skyc0der |http://www.freecodecamp.com/skyc0der
Tom
@moT01
Aug 24 2017 21:36
im gonna give that challenge a look @BrianCodes33 looks like fun
CuttureSync
@culturesync
Aug 24 2017 21:37
@moT01 Yeah after I get this done it's my next section to get to
Gulsvi
@gulsvi
Aug 24 2017 21:37
Yeah, math is pretty important for coming up with good algorithms :)
Mercy Manrique
@mers89
Aug 24 2017 21:37
@BrianCodes33 I want to add the padding because in the responsive version the button is so close to the form almost stacking on each other so figured giving it more room
Brian
@BrianCodes33
Aug 24 2017 21:37
@mers89 ok and you’re trying to add padding on the entire page?
Mercy Manrique
@mers89
Aug 24 2017 21:39
@brian so theres the row where it says "wiki search"+ form+ button. Its 3 divs inside a container. I only want the divs to have padding. Under the css theres a call for .col-centered thats where I was trying to add the padding
@BrianCodes33 let me know if you can view my code if not I can edit the codepen version really quick
Brian
@BrianCodes33
Aug 24 2017 21:41
ok im looking now
Daniel
@DanJP2016
Aug 24 2017 21:41
here is a youtube playlist on data structures and algorithms I found a few days ago. might be helpful to anyone studying those.
https://www.youtube.com/watch?v=8KcUR2iJJ3c&list=PLYsKWjcnp5DI69Z8WmTcuHdfpowZDYnBZ
Brian
@BrianCodes33
Aug 24 2017 21:43
@mers89 if you don’t want your elements so close to each other i would recommend using margin to target each element. although still trying to understand the look you’re going after sorry i can’t help much more...
Tom
@moT01
Aug 24 2017 21:46
@BrianCodes33 i feel like you need to make two arrays, one for all possible sum answers and all possible * answers - then find if any of them match
Brian
@BrianCodes33
Aug 24 2017 21:46
or if you want to change the styling on mobile view a media query can come in handy