Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Josie
@Josie-N
I'll probably take me 4 days or something.
Tristan R
@TristanTaka
So I made it too 120, where we have to design our own portfolio... I breezed through up until 120 but now I am at a dead stop. I am un-sure how we are expected to make a site like the one put on example when up until 120 haven't learned JS and that intensive of CSS?
Are we just supposed to make a portfolio based off our HTML/ Bootstrap knowledge and just not even attempt making something like the site given as a example?
JD Tadlock
@jdtdesigns
@TristanTaka FCC wasn't created to teach you how to code. It's purpose is to challenge you to learn.
So now comes the research and learning on your part
when you're ready, you can come back and finish the project
the process will be the same as you move through
hit wall, research, code 100 different ways to figure out how to do something, come back finish fcc project/challenge ;)
Josie
@Josie-N
@jdtdesigns good advice
Hello911
@Hello911
//Setup
var contacts = [
    {
        "firstName": "Akira",
        "lastName": "Laine",
        "number": "0543236543",
        "likes": ["Pizza", "Coding", "Brownie Points"]
    },
    {
        "firstName": "Harry",
        "lastName": "Potter",
        "number": "0994372684",
        "likes": ["Hogwarts", "Magic", "Hagrid"]
    },
    {
        "firstName": "Sherlock",
        "lastName": "Holmes",
        "number": "0487345643",
        "likes": ["Intriguing Cases", "Violin"]
    },
    {
        "firstName": "Kristian",
        "lastName": "Vos",
        "number": "unknown",
        "likes": ["Javascript", "Gaming", "Foxes"]
    }
];


function lookUpProfile(firstName, prop){
// Only change code below this line

 for(var i=0;i<contacts.length;i++){
   if (contacts[i].firstName){
     if (contacts[i].prop){
       return contacts[i].prop;
     }else return "No such contact";


   }else return "No such property";
 } 



// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");
How do I make "Kristian", "lastName" return "Vos"?
JD Tadlock
@jdtdesigns
@TristanTaka The reality is this stuff takes a long time to learn for the average person. I'm 8 years in and still feel like a noob all the time. :D
@Hello911 You should be using bracket notation with the function params ;)
Hello911
@Hello911
 for(var i=0;i<contacts.length;i++){
   if (contacts[i][firstName]){
     if (contacts[i][prop]){
       return contacts[i][prop];
     }else return "No such contact";


   }else return "No such property";
 }
Like this? @jdtdesigns
Sono Oricco
@Bloemenstraat
Who is prolific using APIs ? I need help for a job, but only in pm, pliiiiz
JD Tadlock
@jdtdesigns
@Hello911 getting close
you're checking if an object named 'bob' exists though
you should be checking to see if the function argument firstName equals the .firstName prop of any of the objects
Christopher
@bradley1492
Hey guys, I am a little bit stuck on the "build a random quote machine" challenge. I got it to randomly give out quotes, but i can´t figure out how to tweet the exact same quote. Now i thought about updating the href of the twitter link through javascript but I am not sure.. Nay advice from you guys?
JD Tadlock
@jdtdesigns
@bradley1492 You can use the twitter intent url and update the href of the link on each new quote. You're on the right track ;)
MaxLAB
@Max-LAB
@bradley1492 you can simply use window.open and twitter url in it
Christopher
@bradley1492
Thanks guys
JD Tadlock
@jdtdesigns
Christopher
@bradley1492
:)
JD Tadlock
@jdtdesigns
you can just concat the quote on the end
no need for window.open ;)
Christopher
@bradley1492
Cool I´ll give those tips some tries!
MaxLAB
@Max-LAB
@jdtdesigns how can you open url without window.open or openURL in *.js file?
JD Tadlock
@jdtdesigns
easy @Max-LAB
just change the href of the tweet link
and make sure it has target="_blank"
Hello911
@Hello911

@jdtdesigns

 for(var i=0;i<contacts.length;i++){
   if (contacts[i].firstName==firstName){

     if (contacts[i][prop]){
       return contacts[i][prop];
     }else return "No such property";


   }else return "No such contact";
 }

Still, tho, not all the requirements are met.
.

MaxLAB
@Max-LAB
@jdtdesigns .attr("href", "http link"); got it.. nice approach :+1:
JD Tadlock
@jdtdesigns
@Hello911 You don't need the else for no such contact
just place that outside the for
@Max-LAB ;)
Hello911
@Hello911
@jdtdesigns GOT IT. challenged completed. thank you.
CamperBot
@camperbot
hello911 sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 876 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
@Hello911 welcome
Chris
@bestintown23
how do i make the footer of my page to be on the bottom? its appearing in the middle.
JD Tadlock
@jdtdesigns
@bestintown23 the page needs to have enough content to push the footer down
if there's not enough content there are tricks you can do to make the footer always stay at the bottom
Baillie O'Grady
@baillieogrady
Chris give it a height and the body/parent a height , I personally use flexbox with a column layout then flex-grow the second to last item
Jennifer
@jchiang7874

I'm working on my random quote machine and it works great UNTIL I double click on the 'New Quote' button. :worried: Instead of clearing previous quotes, it appends to it. Any help is appreciated. Thanks!

https://codepen.io/jchiang7874/pen/YNQNeq

Also, I'm still iffy on APIs, can anyone recommend any tutorials? Thanks.
Tyler Moeller
@TylerMoeller
@jchiang7874 Looks like you fixed it with:
      $(".quote").html("");
      $(".author").html("");
Another way is to use .empty(): https://api.jquery.com/empty/
Ian Lee
@asparism
does anyone know why the promise in this Codepen doesn't work on .then()? http://codepen.io/Asparism/pen/PWPrMK?editors=0011
Mario Galindo
@mariogalindov

Hi there is there a way to make all thumbnails the same height?

http://codepen.io/magv89/pen/xgVoqj?editors=1100