These are chat archives for FreeCodeCamp/HelpFrontEnd

3rd
Sep 2017
John
@AnonymousLords
Sep 03 2017 02:04
Guys how to center a button?
in the center of my page..
iso
@iso1048
Sep 03 2017 02:05
@AnonymousLords perhaps margin:auto
John
@AnonymousLords
Sep 03 2017 02:07
nope, didnt work :P
@gothamknight
Daniel
@DanJP2016
Sep 03 2017 02:08
are you using bootstrap?
iso
@iso1048
Sep 03 2017 02:08
@AnonymousLords do you want it horizontally or vertically centered?
John
@AnonymousLords
Sep 03 2017 02:09
uhhh
just in the middle of my page
Daniel
@DanJP2016
Sep 03 2017 02:10
can you give us the link if you have it on codepen?
iso
@iso1048
Sep 03 2017 02:13
@AnonymousLords style="text-align:center"
John
@AnonymousLords
Sep 03 2017 02:14
Got it :D @gothamknight it worked thanks
CamperBot
@camperbot
Sep 03 2017 02:14
anonymouslords sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 416 | @gothamknight |http://www.freecodecamp.com/gothamknight
Ismail Hozain
@ismailhozain
Sep 03 2017 02:35
hey guys i have an issue with https://codepen.io/ismailhozain/pen/OjvzaZmy weather app- how can i format the output and the individual entries.
hey guys i have an issue with my weather app- how can i format the output and the individual entries. https://codepen.io/ismailhozain/pen/OjvzaZ
Ken Haduch
@khaduch
Sep 03 2017 02:58
@ismailhozain - you are posting the link for the wikipedia viewer, but you said "weather app"?
@ismailhozain - the data that is returned consists of three arrays nested in the object. This link https://codebeautify.org/jsonviewer/cb7a7f39 shows the formatted JSON data for the search for "potato". You can just iterate over the arrays that are contained in that JSON data and select the title, the description and URL for the full article and generate some divs with the output for each article, style it as you'd like, and output it to the output div.
piteto
@piteto
Sep 03 2017 03:08
Is there a more concise way to use $.when for the twitch.tv app? I couldn't figure out how to access the response without the arguments object. https://codepen.io/anon/pen/xLBbjV?editors=0011
Ismail Hozain
@ismailhozain
Sep 03 2017 03:08
whoops sorry i typed the wrong thing
piteto
@piteto
Sep 03 2017 03:09
Ignore the ugly html and missing user stories - just thought I'd get it working for now
Also couldn't figure out how to group both channels + streams endpoint data without doing multiple $.when calls...
Ismail Hozain
@ismailhozain
Sep 03 2017 03:11
how would i address the arrays
piteto
@piteto
Sep 03 2017 03:12
I just did that one yesterday @ismailhozain I can take a look
@ismailhozain The data that comes back looks like this:
var array = [
  "search term",
  ["title1", "title2", "title3"],
  ["extract1", "extract2", "extract3"],
  ["url1", "url2", "url3"]
];
That's a simplified version, and your array goes up to 10 results
you need to loop through the array and use the .html() method in jQuery to add each piece of info
Ismail Hozain
@ismailhozain
Sep 03 2017 03:15
how do i address it? e.g. by name, by id by what?
piteto
@piteto
Sep 03 2017 03:15
@ismailhozain It's a 2d array
so, the first title would be array[1][0]
The first extract would be array[2][0]
I already learned how to access 2d arrays before, so don't know if free code camp teaches that - hope it makes sense
Ismail Hozain
@ismailhozain
Sep 03 2017 03:21
i am trying it out
```var array= array[1][0];
console.log(array);
piteto
@piteto
Sep 03 2017 03:24
the [0] part will change for each article
that should be an [i] in a for loop
for(var i = 0; i < info[1].length; i++) {
  console.log(info[1][i], info[2][i], info[3][i])
}
That shows the title, extract, url for each article
Ismail Hozain
@ismailhozain
Sep 03 2017 03:28
ok i copied that but how do i know if it is working
piteto
@piteto
Sep 03 2017 03:29
look at the console and you should see the info for each article listed
Ismail Hozain
@ismailhozain
Sep 03 2017 03:29
it is there
Ahmed raza
@Raza403
Sep 03 2017 06:44
Hi I need little help for twitch api project. I am unable to retrieve JSON as described in this link, can anyone help me doing it https://wind-bow.glitch.me/
change freecodecamp to the user you want to get json for
Ahmed raza
@Raza403
Sep 03 2017 06:49
How can I know user?
@piteto
piteto
@piteto
Sep 03 2017 06:50
["ESL_SC2", "OgamingSC2", "cretetion", "freecodecamp", "storbeck", "habathcx", "RobotCaleb", "noobs2ninjas"]
Is that what you mean?
Ahmed raza
@Raza403
Sep 03 2017 06:52
@piteto Yes thanks for helping me, I must have made some silly mistake otherwise I was trying the same
CamperBot
@camperbot
Sep 03 2017 06:52
raza403 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 49 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 03 2017 06:53
Ahh, okay, happy to help! @Raza403
Trello Whoomer
@Trellowhoomer
Sep 03 2017 07:07

<!DOCTYPE html>

<html>
<head>
<title>Bootstrap Basics</title>
<link rel="stylesheet" type="text/css" href="bootstrap.css">
</head>
<body>

<nav class="navbar navbar-default"> </nav>

</body>
</html>

why navbar is not showing on the page?
iso
@iso1048
Sep 03 2017 07:10
@Trellowhoomer try <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
Trello Whoomer
@Trellowhoomer
Sep 03 2017 07:11
thnx.. but not working
same prob
nothing shows up
iso
@iso1048
Sep 03 2017 07:13
put content in the navbar
Trello Whoomer
@Trellowhoomer
Sep 03 2017 07:17
it does not matter. According to the bootstrap styling it should at least shown up as a light grey color navbar on the top without content too
iso
@iso1048
Sep 03 2017 07:49
give it a background color. then you will see it
Martialis39
@Martialis39
Sep 03 2017 08:10
hi all, i realise this is a big ask
but can anyone have a look at this code and help me spot why i have an infinite loop
ok I guess its too big for gitter : D
Hills
@Hillsie
Sep 03 2017 09:34
Hi there, could someone remind me how to float a div over and image. I am looking to have an image in the background. I’m using Semantic-ui to style my page.
heroiczero
@heroiczero
Sep 03 2017 09:35
@Hillsie try using z-index maybe
Hills
@Hillsie
Sep 03 2017 09:36
thanks @heroiczero
CamperBot
@camperbot
Sep 03 2017 09:36
hillsie sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1687 | @heroiczero |http://www.freecodecamp.com/heroiczero
heroiczero
@heroiczero
Sep 03 2017 09:37
could also use background-image
Hills
@Hillsie
Sep 03 2017 09:37
thats the one I think.
Ahmed raza
@Raza403
Sep 03 2017 11:26
Hi I need to solve little bug in my code of twitch api, I get json back from api, I try to put description of video as described in "User stories" but that is not being appended I have commented out this in code, You can also see it in "Inspect element" https://codepen.io/raza403/pen/qXgpwj
I am facing problem appending html paragraph using javascript here
Marius Nicolae
@bytao7mao
Sep 03 2017 12:00
guys, href doesn't work for redirection to a class, and it works only for id's ... does someone know a reason why ?
Ken Haduch
@khaduch
Sep 03 2017 12:15
@bytao7mao - ID values have to be unique - used only in one place, class values can be used wherever they are needed, so they can be used in multiple places. That means that you cannot reliably know that there is only one class. If ID values are used correctly, there should only be one instance, so it can be used to find that place in the document.
Marius Nicolae
@bytao7mao
Sep 03 2017 12:16
@khaduch yeah, i managed to fix that, i added some id's in my page :) thank you sir
CamperBot
@camperbot
Sep 03 2017 12:16
bytao7mao sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3264 | @khaduch |http://www.freecodecamp.com/khaduch
Ahmed raza
@Raza403
Sep 03 2017 14:35
I have made twitch api project, kindly check it and give some comments/suggestions.
Rajat Khare
@rajatkhare619
Sep 03 2017 14:37
@Otto-AA Hey! Thank you! I'll try this. :smile:
CamperBot
@camperbot
Sep 03 2017 14:37
rajatkhare619 sends brownie points to @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 387 | @otto-aa |http://www.freecodecamp.com/otto-aa
Tom
@moT01
Sep 03 2017 15:02
@Raza403 you should use that forEach i shared
instead of your for loop
and it will work
Ahmed raza
@Raza403
Sep 03 2017 15:50
@moT01 Ok thanks, I will do it
CamperBot
@camperbot
Sep 03 2017 15:50
raza403 sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 838 | @mot01 |http://www.freecodecamp.com/mot01
CamperBot
@camperbot
Sep 03 2017 16:54
:bulb: to format code use backticks! ``` more info
Jen
@jenhurd8
Sep 03 2017 16:56
var joke;

$(document).ready(function(){  
    function getNewJoke(){
        $.ajax({
            url: 'https://api.icndb.com/jokes/random',
            data: {
                type: 'success',
                id: 'id',
                value: 'joke'
            },
        success: function(response){        
            joke = JSON.stringify(response.value.joke);
            //joke.replace(/&quot;/g,'"');
            //joke.replace("&quot;",/"/g);
            $('#quote').text(JSON.stringif(response.value.joke));
        }
        });
    }
I'm having issues replacing & quot; with actual quotation marks that are being returned from my API request inside the value of joke. Any ideas?
& quot ;
just1witness
@just1witness
Sep 03 2017 17:01
try joke.replace(/&quot/g, '";')
@jenhurd8
Jen
@jenhurd8
Sep 03 2017 17:01
thanks, ill try it
just1witness
@just1witness
Sep 03 2017 17:01
no problem
Tom
@moT01
Sep 03 2017 17:02
joke = joke.splice(1, joke.length);
piteto
@piteto
Sep 03 2017 17:05
@jenhurd8 json.stringify() will add the quotes for you with the .text() method as you have it. Or, you can use the .html() method and add them manually like:
    success: function(response) {
      $("#quote").html("&quot;" + response.value.joke + "&quot;");
    }
This is the same from what I see:
    success: function(response) {
      $("#quote").text(JSON.stringify(response.value.joke));
    }
Jen
@jenhurd8
Sep 03 2017 17:06
for some reason the stringify is not working, these are quotes within the quote that are the issue
piteto
@piteto
Sep 03 2017 17:07
@jenhurd8 You have stringif instead of stringify
missing the y in your code sample above
Jen
@jenhurd8
Sep 03 2017 17:07
its correct in the editor , just not showing on here for the stringify
Tom
@moT01
Sep 03 2017 17:09
you want to replace the quotes with quotes? ... what happens if you just do .html(joke) ?
the quotes arent there?
piteto
@piteto
Sep 03 2017 17:10
$("#quote").text(JSON.stringify(response.value.joke)); // "Chuck Norris speaks Braille."
$("#quote").html("&quot;" + response.value.joke + "&quot;"); // "Chuck Norris speaks Braille."
$("#quote").text(response.value.joke); // Chuck Norris speaks Braille.
Those are the responses I see when I run your code
Jen
@jenhurd8
Sep 03 2017 17:11

"Chuck Norris does not &quot;style&quot; his hair. It lays perfectly in place out of sheer terror."
this is the problem i am having that is within the quote
ill keep trying the suggestions above
piteto
@piteto
Sep 03 2017 17:12
Ahhhhh, use .html() instead of .text() and those &quot; HTML entities will show up as quotes
Jen
@jenhurd8
Sep 03 2017 17:12
oooooo
piteto
@piteto
Sep 03 2017 17:12
$("#quote").html("&quot;" + response.value.joke + "&quot;");
Jen
@jenhurd8
Sep 03 2017 17:13
ok
piteto
@piteto
Sep 03 2017 17:14
those quotes are funny
Jen
@jenhurd8
Sep 03 2017 17:14
they always crack me up
piteto
@piteto
Sep 03 2017 17:14
Google won't search for Chuck Norris because it knows you don't find Chuck Norris, he finds you.
Jen
@jenhurd8
Sep 03 2017 17:14
it worked @piteto !!!
thank you @piteto
CamperBot
@camperbot
Sep 03 2017 17:15
jenhurd8 sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 50 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 03 2017 17:15
Chuck Norris would be proud. Roundhouse kick to those quotes
Jen
@jenhurd8
Sep 03 2017 17:15
hahaha
love it
""It works on my machine" always holds true for Chuck Norris."
thanks again, signing off
just1witness
@just1witness
Sep 03 2017 17:18
My childhood friend subjected me to Chuck Norris marathons when I would visit her...
imperial-isms
@imperial-isms
Sep 03 2017 17:24
Hi, all…can someone help me verify if I’m going crazy? If I’m trying to determine whether "1 eye for of 1 eye.” is a palindrome, and I’m eliminating all puncs, spaces, and digits…what am I missing here?
Why should “eyeforofeye” return false, if I’m testing a palindrome?
Trying not to go straight for the solution
piteto
@piteto
Sep 03 2017 17:26
a palindrome can include digits
that's why this is false: 1 eye for of 1 eye. Remove punctuation and spacing, then it becomes: 1eyeforof1eye
imperial-isms
@imperial-isms
Sep 03 2017 17:28
Oh…my mistake, I just read non-alphanumeric as not including digits
Derp
Thanks @piteto
CamperBot
@camperbot
Sep 03 2017 17:28
imperial-isms sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 51 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 03 2017 17:29
That assignment was a little tricky - I always thought a palindrome included punctuation...until I did that one
just1witness
@just1witness
Sep 03 2017 17:30
Make two arrays, one with the str, having all the characters removed, then that same one, just reversed and compare. Makes it simple
imperial-isms
@imperial-isms
Sep 03 2017 17:31
solved it
I just needed to include digits
just1witness
@just1witness
Sep 03 2017 17:32
:)
piteto
@piteto
Sep 03 2017 17:33
Only one array is needed for the reverse, then compare strings
str = str.toLowerCase().replace(/\W|_/g, '');
return str == str.split('').reverse().join('');
That's how I did it at least
just1witness
@just1witness
Sep 03 2017 17:34
Yeah, I'm visualizing the original str array as the first one. I think that's what I did.
imperial-isms
@imperial-isms
Sep 03 2017 17:40
I split the string into an array and iterated through each value testing for letter and digit ranges. I had trouble with regex and accounting for #%* etc.
What's the regex for non-alphanumeric?
just1witness
@just1witness
Sep 03 2017 17:41
Yeah, regex can be puzzling. have you seen this? http://regexr.com/
play with that and you'll get it in no time
imperial-isms
@imperial-isms
Sep 03 2017 17:44
thanks for the resource…I went through this one: https://regexone.com
That’s a helpful resource you just shared
just1witness
@just1witness
Sep 03 2017 17:46
With the one I shared, you can copy and paste your code into the text box and troubleshoot with the regex until you get the matches you need
I found it very helpful myself :)
imperial-isms
@imperial-isms
Sep 03 2017 17:46
What does “_” do?
I don’t see it in the reference
Nevermind.
Markus Kiili
@Masd925
Sep 03 2017 17:48
@imperial-isms Targets the underscore character _.
imperial-isms
@imperial-isms
Sep 03 2017 17:48
Yeah…went right over my head at first
Doreen Lu
@ThoughtProvoking
Sep 03 2017 18:03
Hello,
Can anyone tell me why Scrollspy isn't working on this codepen? https://codepen.io/ThoughtProvoking/pen/dzajyL
Nevermind...I got it.
hifede
@hifede
Sep 03 2017 19:25
hiya! could someone tell me why my full page view isnt fitting my phone screen? https://codepen.io/arolf_flora/full/WEoYmd
thank you
Adinarayana Raghu
@adinarayaanraghu95
Sep 03 2017 19:37
Hey.
Can someone help me with a plain wordpress theme which will centre any content i post?
Jake
@JakeDVirus
Sep 03 2017 19:48

Below is the code from pluralsight tutorial which let me dwell in a confusion.
As far as i know

$(function() { ... }); is equivalent to $(document).ready(function() { ... });

So why in the 2nd line of the code there is another $(function(){});

$(document).ready(function() {
$(function(){
  $('#showPhoneNav').click(function() {
    $("#myNav").slideToggle('normal',function(){ //Shows Nav area
    if ($('#myNav').is(':visible')) {
        $('#showPhoneNav').text('Hide Navigation');
    } else {
        $('#showPhoneNav').text('Show Navigation');
    } //end of if
    }); //end of slidetoggle
  }); //end of myNav
}); //end showPhoneNav
}); //end of ready
piteto
@piteto
Sep 03 2017 20:28
@hifede Your rows aren't all in containers
just1witness
@just1witness
Sep 03 2017 20:51
Please please please disregard the terrible shape this code is in right now, it's like a pile of dirty laundry, I know. I am puzzled as to why when I click a link, it opens a blank page. If I copy and paste the address from that blank page into the browser of a new tab, it works. What's up with that?
https://codepen.io/Just1witness/pen/KvXdRj?editors=1111
iso
@iso1048
Sep 03 2017 20:53
@just1witness the links work fine for me
just1witness
@just1witness
Sep 03 2017 20:53
huh. What browser are you using?
iso
@iso1048
Sep 03 2017 20:53
chrome
Jake
@JakeDVirus
Sep 03 2017 20:53
@piteto but that is not commented out in the original code shown. well it might be shown up as a typo in the latter part in the tutorial
the else statement is not working. Also after the first click event the if statement is not working too.
what i am doing wrong here
$(document).ready(function() {
    var showPhoneNav = $("#showPhoneNav");
    showPhoneNav.on("click", function(e){
        $("#myNav").slideToggle(function(){
            if(showPhoneNav.text("Show Navigation")){
                showPhoneNav.text("Hide Navigation");
            } else {
                showPhoneNav.text("Show Navigation");
            }
        });
    }) //end of ShowPhoneNav's .on()
});
just1witness
@just1witness
Sep 03 2017 20:56
Maybe it's FF, wouldn't be the first time. @gothamknight
iso
@iso1048
Sep 03 2017 20:57
@just1witness in the past, the twitch website took a while to load...maybe it is a combination of the two
just1witness
@just1witness
Sep 03 2017 20:57
Oh, thank you, I'm going to check that, it might be it
@gothamknight ty
CamperBot
@camperbot
Sep 03 2017 20:58
just1witness sends brownie points to @gothamknight :sparkles: :thumbsup: :sparkles:
:cookie: 417 | @gothamknight |http://www.freecodecamp.com/gothamknight
iso
@iso1048
Sep 03 2017 20:58
good luck
just1witness
@just1witness
Sep 03 2017 20:58
Thank you
piteto
@piteto
Sep 03 2017 20:59
@NeelDVirus Do you have a live demo to debug?
Jake
@JakeDVirus
Sep 03 2017 21:00
@piteto Just a sec. going to update in codepen and will drop the link here
piteto
@piteto
Sep 03 2017 21:03
What is the best practice for making all of these API calls in the twitch.tv app?
As I found out yesterday, a promise chain is nice and clean, unless their is a failure
nested API calls inside a loop seems like a bad practice as it will take much longer to get all the results
Jake
@JakeDVirus
Sep 03 2017 21:07

@piteto This is the codepen link here of the quirk i mentioned just now.
Ignore the black bullet point shown in the navigation. it just happened while copy-pasting the code to codepen.

https://codepen.io/neel111/pen/EvMmgZ

piteto
@piteto
Sep 03 2017 21:08
I see it's getting stuck on "hide navigation"
just1witness
@just1witness
Sep 03 2017 21:10
Oh, I am very bad at this right now, haha. I've been putting off the projects, I'm so much better at the algo's... Now all I have left is projects
@piteto
iso
@iso1048
Sep 03 2017 21:10
@NeelDVirus if(showPhoneNav.text() =="Show Navigation")
just1witness
@just1witness
Sep 03 2017 21:10
I have no clue what a promise chain is
@piteto
piteto
@piteto
Sep 03 2017 21:11

@NeelDVirus

    $("#myNav").slideToggle(function() {
      if (showPhoneNav.text() == "Show Navigation") {
        showPhoneNav.text("Hide Navigation");
      } else {
        showPhoneNav.text("Show Navigation");
      }
    });

That code you got has a bug

oh, batman beat me to it
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:11
can anyone
help me solve the least common multiple challenge?
please?
Jake
@JakeDVirus
Sep 03 2017 21:12
@piteto @gothamknight Oh Fish i interpreted in the wrong way. i should use some different condition in if statement. Damn :D
iso
@iso1048
Sep 03 2017 21:12
@NeelDVirus but you will need to change the text in the html to "Hide Navigation"
Jake
@JakeDVirus
Sep 03 2017 21:13
@siddarthk123 send the link. if anyone can then he/she will
piteto
@piteto
Sep 03 2017 21:13
@just1witness a promise is a way for javascript to go do something that takes a while and "promise" to give you the data later. A promise chain is a bunch of promises all running at once and giving you data back as each of them finishes.
just1witness
@just1witness
Sep 03 2017 21:14
huh @piteto
Oh! before I forget @piteto Thank you! :)
CamperBot
@camperbot
Sep 03 2017 21:14
just1witness sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 52 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 03 2017 21:14
@just1witness getJSON has promises built in
$.getJSON(url).done(function(data) {
    // promise to give me the data when you're done getting it from the URL
})
just1witness
@just1witness
Sep 03 2017 21:14
@siddarthk123 Do you get filters now?
iso
@iso1048
Sep 03 2017 21:15
@piteto I do not know what a promise is either. Does that mean any success function or .done() in an ajax call is a promise?
just1witness
@just1witness
Sep 03 2017 21:15
Aren't all my JSON calls promises, I have .done on them
didn't know why, but it's what I saw working
piteto
@piteto
Sep 03 2017 21:16
well, it's jQuery's way of doing promises it seems. I'm new to them with jQuery. In vanilla JS, you just build a Promise() object
iso
@iso1048
Sep 03 2017 21:17
so is a promise inherently asynchronous then?
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:17
yeah
i get filters now.
piteto
@piteto
Sep 03 2017 21:17
yeah, that's why we use them in JS. For Twitch, you can call the api for all the streamers at the same time
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:17
just1witness
ca you help me on another programming problem
piteto
@piteto
Sep 03 2017 21:18
if we loop through and call them one at a time, then it's a little slower
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:18
can you help me on....
finding least common multiple?
just1witness
@just1witness
Sep 03 2017 21:18
@siddarthk123 Yup, please share what you've done so far
iso
@iso1048
Sep 03 2017 21:19
@piteto how do you make the api calls at the same time?
i do not have anything so fa
r
piteto
@piteto
Sep 03 2017 21:19
@gothamknight you put all of your API calls in an array and then use Promise.all() to process them all at once
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:19
can you give me a starting point
and ill go from there.
just1witness
@just1witness
Sep 03 2017 21:20
k, give me a sec
piteto
@piteto
Sep 03 2017 21:20
Or, in jQuery, it's $.when()
This is an example with jQuery's way of doing it: https://codepen.io/anon/pen/xLBbjV?editors=0011
but....the problem is, if one api call fails, everything blows up and you get nothing...
and it seems like with jQuery, it's a lot of work to prevent that from happening
just1witness
@just1witness
Sep 03 2017 21:22
@siddarthk123 start by creating variables to determine your min and max values, in the array your working with.
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:22
ok
then?
iso
@iso1048
Sep 03 2017 21:23
@piteto far out your code is so succinct.
piteto
@piteto
Sep 03 2017 21:23
I don't like the look of jQuery to be honest...
Thought I would try to do one project with it, but I'm giving up on it
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:23
how do i find the min and the max?
values?
iso
@iso1048
Sep 03 2017 21:24
@piteto do you prefer vanilla, or a framework?
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:24
what do i do after creating the min and the max?
piteto
@piteto
Sep 03 2017 21:24
I use vanilla, but want to get into Node.js
just1witness
@just1witness
Sep 03 2017 21:24
Look up Math.min() and Math.max() on google
piteto
@piteto
Sep 03 2017 21:24
found out I have to do front end to get to back end here, so running through this stuff quickly for now
iso
@iso1048
Sep 03 2017 21:25
@piteto i need to learn vanilla properly. I am wanting to read a book on it but have not had the time yet.
piteto
@piteto
Sep 03 2017 21:25
If you know jQuery, it is basically the same, just more looping and less dollar signs
just1witness
@just1witness
Sep 03 2017 21:26
If you want to really understand these algorithms, watch MR Snow's you tube tutorials, he's an excellent teacher. Just try to do it on your own first, you learn the best that way. @siddarthk123
iso
@iso1048
Sep 03 2017 21:26
true. do you know react, angular or other frameworks?
piteto
@piteto
Sep 03 2017 21:26
vanilla js returns html collections when you don't use IDs - slightly different method names like innerHTML instead of .html()
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:26
just1witness
i created a min and a max.
piteto
@piteto
Sep 03 2017 21:26
Just enough to get by, but I want to move away from front end
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:26

function smallestCommons(arr) {

var maxArray = Math.max(...arr);

var minArray = Math.min(...arr);

}

smallestCommons([1,5]);

iso
@iso1048
Sep 03 2017 21:26
yeah I kind of know those basics but do not really use them - I am just sticking to jQuery at the moment
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:27
what do i do next?
iso
@iso1048
Sep 03 2017 21:28
@piteto i have to head off. Thanks for all the information.
CamperBot
@camperbot
Sep 03 2017 21:28
gothamknight sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 53 | @piteto |http://www.freecodecamp.com/piteto
piteto
@piteto
Sep 03 2017 21:28
Yeah, no problem, I might have to ask you for jQuery help if we run into any challenges that require it :)
Spent last week learning it only to abandon it for now
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:29
just1witness
can you tell me
what to do next?
just1witness
@just1witness
Sep 03 2017 21:32
Trying to share the link without the giant vid preview...
copy and paste that @siddarthk123
Siddarth Krishnan
@siddarthk123
Sep 03 2017 21:34
its
not
not.....
woring
working
the link
Lance
@texas2010
Sep 03 2017 21:36
@siddarthk123 dude. you need to write message once before you send. it you do that repeat. we will think you want to flood this chat. flood the chat is not allow.
that is why i trying to tell you. please write message once before you send...
it seems you dont know how to do that.
Maria Theresa Arruda
@arrudamt
Sep 03 2017 21:38
hello guys!
Lance
@texas2010
Sep 03 2017 21:40
@siddarthk123 if you still do that to everyone. people will lose respect to you. that is why they ignore you a lot. because you did ignore their advice a lot
Maria Theresa Arruda
@arrudamt
Sep 03 2017 21:44
does anyone have experience wity bootcamp here?
Lance
@texas2010
Sep 03 2017 21:49
@siddarthk123, let you know i am freecodecamp moderator. okay
Jan Shah
@JanShah
Sep 03 2017 21:50
@arrudamt i've heard good stories about bootcamps.
Maria Theresa Arruda
@arrudamt
Sep 03 2017 21:51
@JanShah can you tell me more?
LydaTech
@lydatech
Sep 03 2017 21:52
@siddarthk123 you here?
Jan Shah
@JanShah
Sep 03 2017 21:54
very intensive courses, costly but a lot of positive results for participants. If you have reasonable coding experience already it I think it can really help you make fast progress and get a job quicker
@arrudamt
but it's a big upfront cost so choose your bootcamp carefully
Maria Theresa Arruda
@arrudamt
Sep 03 2017 21:55
@JanShah yeah, i could see that
@JanShah i'm having problems with the div element, any suggestion?
Jan Shah
@JanShah
Sep 03 2017 21:56
@arrudamt I can try
LydaTech
@lydatech
Sep 03 2017 21:57
@siddarthk123 I sent you a PM you need to respond to
LydaTech
@lydatech
Sep 03 2017 22:09
@siddarthk123 Once again check your PM!
Roxroy
@roxroy
Sep 03 2017 22:11
@rafaelmonroy , showCelcius, is a boolean variable. Which means the possible values are true of false.
the statement showCelcius = !showCelcius; flips the value to true if it is false, or to false if it is true. it is the same a if (showCelcius== false) showCelcius = true else showCelcius = false
hifede
@hifede
Sep 03 2017 22:24
@piteto thank you. could you please give me an example?
CamperBot
@camperbot
Sep 03 2017 22:24
hifede sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 54 | @piteto |http://www.freecodecamp.com/piteto
Georgi Yudin
@gyudin
Sep 03 2017 23:42
Hey, guys! Do you know any worthwhile bootcamps for front-end engineers?