Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • 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
amasian sends brownie points to @ezioda004 :sparkles: :thumbsup: :sparkles:
:cookie: 535 | @ezioda004 |http://www.freecodecamp.org/ezioda004
Ken Haduch
@zootechdrum - well, it might be passing the test, but it might just be a little bit "lucky" dependent on the structure of the test data. Oh, and there is a slight problem in the code that you posted. First, the conditional testing if (contacts[i].firstName === firstName & contacts[i].hasOwnProperty(prop)){ the operator for the "AND" operation should really be &&, a logical AND test. But with the test data as it is, it works.
The data or test could be constructed that would fail, for example for the "Bob", "number" case, if one of the contacts on the list did not have a number property, your first conditional test would never pass (because there is no "Bob"), so it would always look at the second else if and if there was a contact record without a number property, it would return "No such property", instead of the No such contact. So it's just a matter of the data just working out right. You could experiment with this by changing the data (temporarily) for example making the record for "Sherlock" have a "numbers" property instead of "number" - it will then fail that "Bob" test in the list.
Just some other things to consider when you are evaluating how to solve the problem.
There is so much of this bootsrap I cannot get to work such as corner round
just wondering if there is a better way to add a horizontal line on the right side of my image.
here is the link to my codepen
Stephen James
@zootechdrum Horizontal? Or vertical?
@khaduch thats going to take time to rap my head around lol
let me think about it
Stephen James
@zootechdrum I would probably wrap another div around the img and use its right border
@Mera77 how can i get the caption , video has not this option.what software can
do that onlineq
Stephen James
That avoids the height: 2000px and uses the images height
Dhaval Vira
is there any Back-End Developer is here then plz Ping me
Ken Haduch
@zootechdrum :point_up: April 12, 2018 9:14 PM - yeah, it might. It took me a little while to think of a case where they could set up data that would not be properly handled by your code. I'm always amazed at the kinds of things that people who are really involved in testing systems have to think of to uncover all of the strange cases that might occur. But if you have some time to spend on it and have questions, ask away!
@khaduch Yeah, now i see what you mean
and i see where it could go wrong
I would have to check if the name exists at all. I could use another && statement on the second conditional and check if the name that it iterates through is the same as the param passing in but does not have the prop value to execute "no prop exist"
@sjames1958gm hey
I tried doing that but for whatever reason my vertical line changes to an off white color
here is the current codepen
why it's not running ?
@roxxlen look like you didnt pass callback function to place
how can i do it
@roxxlen May I ask why are you invoking place() twice, initially without an argument and later with an argument? You shouldnt be invoking it twice, so you can remove the first call inside $(document).ready(function){}
In your $.ajax call you have a typo, sucess should be success. Second navigator.geolocation.getCurrentPosition(sucess, error); in this method, error callback function isnt defined and finally that data you receive from $.ajax() is JSON and not an object, so you need to parse that in order to use that as an object. JSON.parse(data) would do the job.
here is the original code
i've fixed the typo and added a error function
for this instance, the api already return a object , so there seems no need to parse it
should i give the second call a new function name ?
Ken Haduch

@zootechdrum - the simplest way (in my opinion) to do that check is this:

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

so if you have a firstName match, then you check for the property and make the appropriate return. If you don't have a firstName match, you let the for loop do the next iteration and so on...

@roxxlen This one doesnt seem to work at all? Theres no error in the console, but not sure where its going wrong.
yep.... i just ripped out of those hidden buttons, stucked on the call function
@roxxlen invoking place() seems to make it work. The API is responding slowly.
@khaduch netsed if gocha
@ezioda004 no , it's not
@ezioda004 that's sombody's art of work
mine is an assembling
the original one triggered with clicking on buttons
@roxxlen I see, this one is yours?
Can anyone enlighten me how will i be able to work with someone for a project i'm currently making. sort of a collaborator.. should i give them my keys for my api's and database url etc for them to run my project locally ? i have no idea how pair programming works
@2HexGFX_twitter Depends how close this collaborator is, and the level of access needed. If your api keys are to get weather or something I don't see any problems. Now if your accessing a database that holds sensitive information, then I might wanna re-consider.
But if they want to develop locally, you'll need to give them your database access info one way or another, or they need to setup their own, but that can be a mess.
hey guys where is the main fcc chatroom?
Markus Kiili
@javascriptcookie It was closed down about a week ago.