These are chat archives for FreeCodeCamp/HelpFrontEnd

22nd
Jan 2017
Sunny Wong
@swong194
Jan 22 2017 00:00 UTC
but i was wondering how to get the navigation bar's position to be fixed after its reached the top
Daniel
@DanJP2016
Jan 22 2017 00:11 UTC
@grajsb on line 19 change your innerHTML to textContent, that will get rid of the p tags from showing up in the tweet, and change your var tweetURI to just include the endodeURI(phrase). then just call the window.open("https://twitter.com/intent/tweet?text=" + phrase);
that should fix it.
GuiRod22
@GuiRod22
Jan 22 2017 00:12 UTC
Hi
how to make a thumbnail to a pen from codepen ?
I want to put a project I made in the portfolio, but i don't know how to make a thumbnail to put a link.
Marcin_L
@lotosiauke
Jan 22 2017 00:44 UTC
@GuiRod22 just copy and paste URL from browser
Oh, sorry :) I misunderstood
GuiRod22
@GuiRod22
Jan 22 2017 00:57 UTC
I did it, but it didn't worked, i mean, my code is a mess lol
I mean, i thought it was automated, just put the link of codepen and it make a thumbnail, but it didn't
Ayush Bahuguna
@relentless-coder
Jan 22 2017 02:55 UTC
does anyone here use atom? I can't use jslinter on it.
JD Tadlock
@jdtdesigns
Jan 22 2017 02:56 UTC
@relentless-coder I don't recommend atom. Have you tried Visual Studio Code?
Ayush Bahuguna
@relentless-coder
Jan 22 2017 03:01 UTC
@jdtdesigns visual studio code acts way to weird. I haven't been able to grasp it's concept regarding removing folders and adding folders
JD Tadlock
@jdtdesigns
Jan 22 2017 03:03 UTC
@relentless-coder I personally use Sublime, but VScode doesn't give me any issues. I'd recommend looking up the shortcut keys for common commands. Also, install the Advanced New File plugin and file stuff is easy peezy.
Milos Ratkovic
@Shadow032
Jan 22 2017 03:04 UTC
Hey guys, anyone here can tell me why my :visited selector doesnt work, here's my codepen : http://codepen.io/Shadow032/full/QdvbbK/
Ayush Bahuguna
@relentless-coder
Jan 22 2017 03:04 UTC
I find atom productive. I don't know, the whole stuff is easy on the eye. Maybe, it's because I have been into programming for only 7 months now. don't want to deal with config files
@Shadow032 have you set it to default color? if yes, then it is working
JD Tadlock
@jdtdesigns
Jan 22 2017 03:08 UTC
@relentless-coder The main reason i can't stand Atom is the speed. Once you use Sublime you'll see how slow and laggy it is.
It is pretty though
but for me speed is way more important
Ayush Bahuguna
@relentless-coder
Jan 22 2017 03:09 UTC
@jdtdesigns yes. sublime is fast, but as I said, you have to deal a lot with the config files to adjust it to your requirements.
JD Tadlock
@jdtdesigns
Jan 22 2017 03:10 UTC
@relentless-coder All editors require quite a lot of tweaking once you have a certain workflow
I install at least 8 to 10 plugins/extensions for any editor i work in
Ayush Bahuguna
@relentless-coder
Jan 22 2017 03:11 UTC
@jdtdesigns again, not very sure what all plugins I need. i just browse through atom's packages and add it if it sounds useful. Also, I want editor for professional use, and I am not yet ready to pay $70 for sublime.
JD Tadlock
@jdtdesigns
Jan 22 2017 03:13 UTC
I'm not saying Atom is not a decent editor. Use it if it suits you. It just doesn't work for me. :D
Milos Ratkovic
@Shadow032
Jan 22 2017 03:13 UTC
@relentless-coder What do you mean by default color? Did I set what? <a> tag's default color?
Ayush Bahuguna
@relentless-coder
Jan 22 2017 03:14 UTC
@Shadow032 i clicked on a link, and it's color changed. is that what you are looking for?
@jdtdesigns I get it.
Milos Ratkovic
@Shadow032
Jan 22 2017 03:15 UTC
@relentless-coder When you search for something, and when you click on one of the results, that result should change the text color to like darker gray smth like #555;
Ayush Bahuguna
@relentless-coder
Jan 22 2017 03:34 UTC
@Shadow032 yes, and it is changing to color decided by browser styles
@Shadow032 the problem is that random class is for the link that provides random article. there is no random class set for the links in the results. you need to add the class dynamically
amitsharma1919
@amitsharma1919
Jan 22 2017 03:44 UTC
Please help me in local weather project. I am using the navigator.geolocation, but no data is getting returned
JD Tadlock
@jdtdesigns
Jan 22 2017 04:33 UTC
@amitsharma1919 If you're in chrome you'll need to load the page through https:// for navigator to work. You'll also need to use an api that supports https like Weather Underground or Apixu
GordonBombay88
@GordonBombay88
Jan 22 2017 04:54 UTC
Yo yo peeps. Anyone good with tables and row heights? My wiki app's row heights for descriptions is off slightly compared to the title row heights. Need help! 8)
JD Tadlock
@jdtdesigns
Jan 22 2017 04:57 UTC
@GordonBombay88 Tables should only be used for tabular data, not layout. ;)
GordonBombay88
@GordonBombay88
Jan 22 2017 04:59 UTC
@jdtdesigns I'm committed...basically done. Just trying to wrap this up.
Lydia Larae
@nevaIsDreaming
Jan 22 2017 05:14 UTC
can anyone provide me with some insight about what is not working about this code for wherefore art thou?
function whatIsInAName(collection, source) {
  // What's in a name?
  var arr = [];
  // Only change code below this line

  var sourceKeys = Object.getOwnPropertyNames(source);

  for(var i = 0; i < sourceKeys.length; i++) {
    arr = arr.filter(function(){
      if (collection.hasOwnProperty(sourceKeys[i])) {
        if (collection.sourceKeys[i] === source.sourceKeys[i]){
          return true;
        }
      } else {
        return false;
      }                
                     });
  }

  // Only change code above this line
  return arr;
}

whatIsInAName([{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }], { last: "Capulet" });
Ghulam Shabir
@ghulamshabir
Jan 22 2017 05:19 UTC
@nevaIsDreaming there is nothing in arr to filter out, it's empty
Monesul Haque
@mones-cse
Jan 22 2017 05:21 UTC
@nevaIsDreaming
the problem is in your arr.filter
Lydia Larae
@nevaIsDreaming
Jan 22 2017 05:21 UTC
@ghulamshabir thanks, i actually just caught that and added a for loop to copy all the values from collection into arr
CamperBot
@camperbot
Jan 22 2017 05:21 UTC
nevaisdreaming sends brownie points to @ghulamshabir :sparkles: :thumbsup: :sparkles:
:star2: 1736 | @ghulamshabir |http://www.freecodecamp.com/ghulamshabir
Lydia Larae
@nevaIsDreaming
Jan 22 2017 05:21 UTC
@mones-cse is it the function?
Ghulam Shabir
@ghulamshabir
Jan 22 2017 05:22 UTC
you might want to use loop inside filter callback. indexOf or includes can be used in place of loop
JD Tadlock
@jdtdesigns
Jan 22 2017 05:25 UTC
@nevaIsDreaming can you link to the challenge?
Ghulam Shabir
@ghulamshabir
Jan 22 2017 05:26 UTC
@nevaIsDreaming there is no need of copying elements from collection and also it does not make difference because objects in collection will be copied by reference. you can use filter on collection
Lydia Larae
@nevaIsDreaming
Jan 22 2017 05:28 UTC
https://www.freecodecamp.com/challenges/wherefore-art-thou#?solution=%0Afunction%20whatIsInAName(collection%2C%20source)%20%7B%0A%20%20%2F%2F%20What%27s%20in%20a%20name%3F%0A%20%20var%20arr%20%3D%20%5B%5D%3B%0A%20%20%2F%2F%20Only%20change%20code%20below%20this%20line%0A%20%20%0A%20%20for%20(var%20t%20%3D%200%3B%20t%20%3C%20collection.length%3B%20t%2B%2B)%20%7B%0A%20%20%20%20arr.push(collection%5Bt%5D)%3B%0A%20%20%7D%0A%20%20%0A%20%20var%20sourceKeys%20%3D%20Object.getOwnPropertyNames(source)%3B%0A%20%20%0A%20%20for(var%20i%20%3D%200%3B%20i%20%3C%20sourceKeys.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20arr%20%3D%20arr.filter(function()%7B%0A%20%20%20%20%20%20if%20(collection.hasOwnProperty(sourceKeys%5Bi%5D))%20%7B%0A%20%20%20%20%20%20%20%20if%20(collection%5BsourceKeys%5Bi%5D%5D%20%3D%3D%3D%20source%5BsourceKeys%5Bi%5D%5D)%7B%0A%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%20%20%7D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20%0A%20%20%2F%2F%20Only%20change%20code%20above%20this%20line%0A%20%20return%20arr%3B%0A%7D%0A%0AwhatIsInAName(%5B%7B%20first%3A%20%22Romeo%22%2C%20last%3A%20%22Montague%22%20%7D%2C%20%7B%20first%3A%20%22Mercutio%22%2C%20last%3A%20null%20%7D%2C%20%7B%20first%3A%20%22Tybalt%22%2C%20last%3A%20%22Capulet%22%20%7D%5D%2C%20%7B%20last%3A%20%22Capulet%22%20%7D)%3B%0A
sorry for the mess. i couldnt get it to work with the markdown
Ghulam Shabir
@ghulamshabir
Jan 22 2017 05:30 UTC
[name](url)
Lydia Larae
@nevaIsDreaming
Jan 22 2017 05:35 UTC
@ghulamshabir right. but the () in the code aren't escaped so part of the url ends up in the link name and part ends up as text. do you know how to get around that?
Ghulam Shabir
@ghulamshabir
Jan 22 2017 05:38 UTC
@nevaIsDreaming may be using \ to escape parentthesis not sure
Lydia Larae
@nevaIsDreaming
Jan 22 2017 05:39 UTC
i'll try it
JD Tadlock
@jdtdesigns
Jan 22 2017 06:00 UTC
so you have to iterate through each object in the collection array and check if the source key and source value match a key/value pair in the current object in the iteration
@nevaIsDreaming
if so, you push the current object in the iteration to the arr
there's different ways to do it and using filter is totally possible
i just did it using .filter() and .map()
you can actually turn an object into an array of keys using Object.keys(myObject);
Gururaj Birajdar
@grajsb
Jan 22 2017 06:14 UTC
Hello
my tweet button gets the code pen url along with the tweet can some one pls help me get rid of it
Nitin Chandran Nair
@NitinNair89
Jan 22 2017 06:16 UTC
hi
Lydia Larae
@nevaIsDreaming
Jan 22 2017 06:16 UTC
@jdtdesigns thanks. thats helpful..
CamperBot
@camperbot
Jan 22 2017 06:16 UTC
nevaisdreaming sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 873 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
JD Tadlock
@jdtdesigns
Jan 22 2017 06:22 UTC
@grajsb
var phrase = document.getElementById('quoteToTweet').innerText; // use innerText instead
 phrase = phrase.replace(/\/r/g,''); // remove this as it's not needed with innerText
RadiationJunky
@RadiationJunky
Jan 22 2017 06:28 UTC
so I've got kind of an advanced problem can someone help me out here
trying to get my unordered lists to float to the left ant right of the centered image lined up with eachother
JD Tadlock
@jdtdesigns
Jan 22 2017 06:31 UTC
@grajsb You're using jQuery and still mixing vanilla js with it. Use jQuery's functionality instead.
var tweetUrl = 'https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=' + $('#quoteToTweet').text();
window.open(tweetUrl);
@RadiationJunky Vertical centering is something that Bootstrap doesn't do well.
It's easy to accomplish using flexbox
JD Tadlock
@jdtdesigns
Jan 22 2017 06:39 UTC
Varun Kumar
@heysadboy
Jan 22 2017 07:08 UTC
https://heysadboy.github.io/work.html how to remove these white strips on sides?
rene-meda
@rene-meda
Jan 22 2017 07:08 UTC
Hello people! I am currently doing the portfolio webpage project and I took a look at the sample portfolio page they provided. I am wondering if anybody can tell me the style of code the author used?
Mike Boardley
@Boardley
Jan 22 2017 07:10 UTC
@heysadboy
```
<div id="work-section" class="clearfix"
@heysadboy - Forget that. It won't work.
Here is what does work.
#work-section {
    background-size: cover;
    background: #080808;
    height: 100%;
    width: 100%;
overflow:hidden;
  padding-top: 50px;
}
@heysadboy - You want to add overflow:hidden
to your #work-section ID
Varun Kumar
@heysadboy
Jan 22 2017 07:14 UTC
@Boardley but the page wont scroll then
Mike Boardley
@Boardley
Jan 22 2017 07:15 UTC
@heysadboy
add
overflow-y: auto
rafter overflow:hidden
#work-section {
    background-size: cover;
    background: #080808;
    height: 100%;
    width: 100%;
overflow:hidden;
overflow-y: auto;
  padding-top: 50px;
}
Varun Kumar
@heysadboy
Jan 22 2017 07:17 UTC
@Boardley overflow-x: hidden; worked, thanks!
CamperBot
@camperbot
Jan 22 2017 07:17 UTC
:cookie: 278 | @boardley |http://www.freecodecamp.com/boardley
heysadboy sends brownie points to @boardley :sparkles: :thumbsup: :sparkles:
Tyler Moeller
@TylerMoeller
Jan 22 2017 07:25 UTC
@relentless-coder jslint is a pain to set up with Atom. JSCS works great if you're willing to consider a different option
Ivan Ngundela
@ingundela
Jan 22 2017 07:30 UTC
hello everone...
Tyler Moeller
@TylerMoeller
Jan 22 2017 07:30 UTC
@rene-meda The sample portfolio uses Pug (formerly known as Jade). https://pugjs.org/api/getting-started.html
Ivan Ngundela
@ingundela
Jan 22 2017 07:30 UTC
need some help with the challenge Show the local Wather., I don't understand why is my code not working... the link is https://codepen.io/ingundela/pen/rjMege
rene-meda
@rene-meda
Jan 22 2017 07:31 UTC
@TylerMoeller Thank you!
CamperBot
@camperbot
Jan 22 2017 07:31 UTC
rene-meda sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1363 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
JD Tadlock
@jdtdesigns
Jan 22 2017 07:35 UTC
@ingundela @TylerMoeller And numerous errors in the js code :/
Megan
@megan32
Jan 22 2017 07:35 UTC
hey testing a little code to play with the weather app (expand on it/change it a bit), anyone willing to take a peak?
link: https://repl.it/FQQJ/20
issue: line 51 / line 39 (I think...), prints ‘undefined’, but all the variable (i think are defined) and everything is console.log-ing without issue…What am I missing?
Tyler Moeller
@TylerMoeller
Jan 22 2017 07:37 UTC
@jdtdesigns You should give Atom another try ;)
JD Tadlock
@jdtdesigns
Jan 22 2017 07:37 UTC
I've given it a big try as i had to research multiple editors before picking one to use in a basics course i'm creating @TylerMoeller
If you use Vim or Sublime on a consistent basis, Atom will grind your gears in less than 5 minutes
No one all be all solution for sure
it's kind of like moving from an iphone 7 to iphone 4 though for me
James Payne
@jamespayne
Jan 22 2017 08:07 UTC
@DavidMinAZ glad I could help.
playingwithinfinity
@playingwithinfinity
Jan 22 2017 09:50 UTC
How do I make my grey block appear at the center of the screen? http://codepen.io/jimpix/pen/zNNBZr
James Payne
@jamespayne
Jan 22 2017 09:52 UTC
@playingwithinfinity Do you mean vertically or horizontally?
playingwithinfinity
@playingwithinfinity
Jan 22 2017 09:53 UTC
@jamespayne Horizontally
James Payne
@jamespayne
Jan 22 2017 09:55 UTC
@playingwithinfinity have you tried margin: auto; on your div?
playingwithinfinity
@playingwithinfinity
Jan 22 2017 09:55 UTC
@jamespayne Ya now it works
alfaiz momin
@alfaiz-momin
Jan 22 2017 10:50 UTC
In the codepen. I'm trying to insert <img> but image not appearing. please help me.
Francois van Leersum
@Blockshot12
Jan 22 2017 10:55 UTC
@alfaiz-momin Where did you place the image on the internet?
alfaiz momin
@alfaiz-momin
Jan 22 2017 10:57 UTC
i give it the "src" from wikipedia.
James Payne
@jamespayne
Jan 22 2017 10:59 UTC
@alfaiz-momin Have a look at you’re browser console. Is it displaying any errors?
Francois van Leersum
@Blockshot12
Jan 22 2017 11:00 UTC
@alfaiz-momin
<img src=“https://upload.wikimedia.org/wikipedia/commons/3/31/Michael_Jackson_in_1988.jpg” />
does this one work?
alfaiz momin
@alfaiz-momin
Jan 22 2017 11:02 UTC
@Blockshot12 its working!!!
Francois van Leersum
@Blockshot12
Jan 22 2017 11:03 UTC
@alfaiz-momin ok, you got yours working or the one I gave you?
James Payne
@jamespayne
Jan 22 2017 11:03 UTC
Codepen blocks some image sources. Check your console.
alfaiz momin
@alfaiz-momin
Jan 22 2017 11:05 UTC
your img is working but not mine.
Francois van Leersum
@Blockshot12
Jan 22 2017 11:07 UTC
@alfaiz-momin then you should do what @jamespayne suggested, open your console.
James Payne
@jamespayne
Jan 22 2017 11:10 UTC
@Blockshot12 I just tried the images that you used and they seem to work too so they are obviously not blocking wikipedia images. Came across this during a map.
alfaiz momin
@alfaiz-momin
Jan 22 2017 11:11 UTC
@Blockshot12 what should i do in consol?
Francois van Leersum
@Blockshot12
Jan 22 2017 11:11 UTC
@alfaiz-momin use this link
skip console
you had the wrong link
you copied a page
alfaiz momin
@alfaiz-momin
Jan 22 2017 11:12 UTC
@Blockshot12 yah now its working. thanks.
CamperBot
@camperbot
Jan 22 2017 11:12 UTC
:cookie: 357 | @blockshot12 |http://www.freecodecamp.com/blockshot12
alfaiz-momin sends brownie points to @blockshot12 :sparkles: :thumbsup: :sparkles:
Francois van Leersum
@Blockshot12
Jan 22 2017 11:12 UTC
your welcome
James Payne
@jamespayne
Jan 22 2017 11:12 UTC
always check you’re console either way.
alfaiz momin
@alfaiz-momin
Jan 22 2017 11:12 UTC
but what was the prob?
Francois van Leersum
@Blockshot12
Jan 22 2017 11:13 UTC
@alfaiz-momin your link was to a page
alfaiz momin
@alfaiz-momin
Jan 22 2017 11:13 UTC
ok.
Francois van Leersum
@Blockshot12
Jan 22 2017 11:14 UTC
when you want to use an image, right klik the image and hit copy image address.
that way you know for sure you have only the image.
Josie
@Josie-N
Jan 22 2017 12:49 UTC
https://codepen.io/CMYK/pen/bgqOxG?editors=1100
Hey guys, so this is my tribute page (challenge).
⭐️ I'm currently trying to make the thumbnail around my image bigger (especially the bottom part 😬) through CSS. Any suggestions?
James Payne
@jamespayne
Jan 22 2017 12:56 UTC

@Josie-N Hey Josie, when you say thumbnail, could you describe exactly what you are trying to achieve? Do you mean the border?

As a tip, if you want to apply multiple classes to an element, just have one class delcaration class="img-thumbnail center-block smaller-image border”. You cannot have multiple class attributes.

I’ve just tried it with that class declaration and it has changed dramatically.
James Payne
@jamespayne
Jan 22 2017 13:09 UTC
Here is the full code for that image as an example for using multiple classes on one element:
<img class="img-thumbnail center-block smaller-image border" src="https://s-media-cache-ak0.pinimg.com/564x/9b/08/1c/9b081cc97a65b99a4daf7aa24c173ed1.jpg" alt="Portrait of Alexander McQueen">
iLucchini
@iLucchini
Jan 22 2017 13:24 UTC
hey guys having a bit of trouble, I am creating my tribute page but it seems I can only center my image by using margin-left XXXpx; I tried putting align="middle" in the img but it just won't center like the rest does, can any1 help me?
James Payne
@jamespayne
Jan 22 2017 13:25 UTC
@iLucchini Do you have a link to you’re pen?
iLucchini
@iLucchini
Jan 22 2017 13:25 UTC
yea wait a second :)
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Jan 22 2017 13:27 UTC
you could try margin: 0 auto;
iLucchini
@iLucchini
Jan 22 2017 13:28 UTC
I also did this in Atom instead of codepen :/
I basically tried to recreate the site that was shown as an example, and it had an image with this white border around it and some text at the bottom (which was still in the white-zone) but it just doesn't work the way I tried it
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Jan 22 2017 13:31 UTC
@iLucchini You could set display: block;and margin: 0 auto; or set text-align: center;on a parent of it
*the first two on the img itself, only the third would be on the parent element
iLucchini
@iLucchini
Jan 22 2017 13:32 UTC
so just add display: block; and margin: 0 auto; to .white-box ?
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Jan 22 2017 13:33 UTC
yeah
James Payne
@jamespayne
Jan 22 2017 13:33 UTC
@Otto-AA 👍
iLucchini
@iLucchini
Jan 22 2017 13:34 UTC
well that instantly worked! thank you so much :) Now I just need to get the text in the white block/box
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Jan 22 2017 13:35 UTC
@iLucchini And a little tip: Try to make your design responsive, so it also fits for smaller screens (->mobile phones) ;)
iLucchini
@iLucchini
Jan 22 2017 13:36 UTC
I have to redo the first tasks to do that because I seriously forgot a lot of stuff :/
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Jan 22 2017 13:37 UTC
@iLucchini Good luck on it =D
iLucchini
@iLucchini
Jan 22 2017 13:37 UTC
thank you =)
James Payne
@jamespayne
Jan 22 2017 13:45 UTC
@iLucchini If this helps, its good to get familiar with what elements are block and inline by default. Theres a document here which shows that. Furher down is a link to inline elements.
This may help you choose an appropriate element without even having to do any css.
In some cases that is.
Rodi
@rodiw
Jan 22 2017 14:14 UTC
Hi there! I was just wondering if anyone here has an site where I can watch amature made websites. Websites that were done by people who just started, or just your first website. Thank you!
Rishav upadhayay
@Rish-hap
Jan 22 2017 14:31 UTC
Screenshot (131).png
can anyone please help me with placing the text(Hello everyone ) below the image rather than the way it is now

<!doctype html>

<html>

<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">

<style>
h1{
text-decoration:underline;
}
</style>

<title>tribute page</title>
</head>

<body>

<h1 align="center"> S.R. Tendulkar</h1>
<h3 align="center">If cricket is religion then Sachin is God </h3>
<img style="position:absolute; TOP:120px;LEFT:340px;" src="http://res.cloudinary.com/rish/image/upload/v1485091046/rish_egwlog.jpg" alt="sachin" width="50%" height="150%">
<h1>hello everyone</h1>

Screenshot (133).png
Ritvars
@RitvarsZ
Jan 22 2017 14:45 UTC
@Rish-hap remove position: absolute from the image, perhaps?
Pieter Stokkink
@forkerino
Jan 22 2017 14:47 UTC
And use the bootstrap you included.
Rishav upadhayay
@Rish-hap
Jan 22 2017 14:56 UTC
@RitvarsZ thanks. removing absolute helped
CamperBot
@camperbot
Jan 22 2017 14:56 UTC
:cookie: 287 | @ritvarsz |http://www.freecodecamp.com/ritvarsz
rish-hap sends brownie points to @ritvarsz :sparkles: :thumbsup: :sparkles:
Khang Duy
@KD158
Jan 22 2017 15:00 UTC
i don't know what am i suppose to write in the Personal Portfolio Webpage...
Cristopher Encarnacion
@chris0715
Jan 22 2017 15:07 UTC
I need some help with React in ES6
Sakir Inteser
@intesers
Jan 22 2017 15:10 UTC

Hi guys!I wrote a code in the "profile lookup" in basic javascript and it passed but i believe there's a much simpler code.can anyone please tell me a simpler code?

//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
var results = false;
for(var i = 0;i<contacts.length; i++) {
if(contacts[i].firstName == firstName) {
if(contacts[i].hasOwnProperty(prop)){
results = true;
return contacts[i][prop];
}
else {
return "No such property";
}
}
} if (results === false) {
return "No such contact";
}
// Only change code above this line
}

// Change these values to test your function
lookUpProfile("Akira", "likes");

abhijith shenoy
@shenoyabhijith
Jan 22 2017 15:12 UTC
anybody here knows how to use the api sandbox of wiki pedia
Keith Moore
@Mookh01
Jan 22 2017 15:37 UTC
hello all! Anyone here who could help with a node.js express.js question?
Tyler Moeller
@TylerMoeller
Jan 22 2017 15:38 UTC
@Mookh01 We can try, but you may have more luck over here: https://gitter.im/expressjs/express
Keith Moore
@Mookh01
Jan 22 2017 15:41 UTC
Thanks @TylerMoeller , I'm working on the nightlife challenge and I've been trying to think of how to work the "going" / "not going" button. specifically...
CamperBot
@camperbot
Jan 22 2017 15:41 UTC
mookh01 sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1364 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Rahul Yedida
@yrahul3910
Jan 22 2017 15:42 UTC
@Mookh01 Maybe try the BackEnd chatroom
Keith Moore
@Mookh01
Jan 22 2017 15:43 UTC
yeah I tried that. No one ever answers. thought maybe since its a button click issue they might consider that frontend for some reason.
Rahul Yedida
@yrahul3910
Jan 22 2017 15:43 UTC
I see. Not many campers have reached that far I guess.
Keith Moore
@Mookh01
Jan 22 2017 15:44 UTC
alright, I'll try other avenues then.
Tyler Moeller
@TylerMoeller
Jan 22 2017 15:44 UTC
@Mookh01 Sorry, haven't worked on Twitter OAuth yet :/
Tyler Moeller
@TylerMoeller
Jan 22 2017 16:01 UTC
@intesers Most of the challenges have a wiki page associated with them in the forums if you want to check other answers. https://forum.freecodecamp.com/t/freecodecamp-challenge-guide-profile-lookup/18259
Your solution is close to the one given, only you don't need to define a results variable.
@shenoyabhijith Yes, what's your question?
Luke Sallmen
@LukeSallmen
Jan 22 2017 16:44 UTC
Hey y'all. I have a JavaScript question. I'm trying to do a famous beginner coding challenge called FizzBuzz, and I'm a bit because I'm a little unsure on syntax. Here is my code thus far. <code> var count = 0;
for (count = 0; count < 99; count = count + 1)
if (count % 3 == 0)
console.log("Buzz");
else if (count % 5 == 0)
console.log("Fizz");
else if (count % 15 == 0)
console.log("FizzBuzz");
else
console.log(count); </code>
I'm a bit stuck*
the "else if" statement at the end is definitely wrong. I don't want it to happen when the else if statement before is false, I want it to happen when both before it are true. But that's not what else if does.
Cduffy098
@Cduffy098
Jan 22 2017 17:06 UTC
damn I have started this tribute page test thing and I have forgotten pretty much everything I have learnt up until now :(
jrandallhansen
@jrandallhansen
Jan 22 2017 17:08 UTC
@Blockshot12 Thank you for the answer a month ago! lol
CamperBot
@camperbot
Jan 22 2017 17:08 UTC
jrandallhansen sends brownie points to @blockshot12 :sparkles: :thumbsup: :sparkles:
:cookie: 358 | @blockshot12 |http://www.freecodecamp.com/blockshot12
Luke Sallmen
@LukeSallmen
Jan 22 2017 17:15 UTC
nvm figured it out, I need to stop posting on a whim and start really thinking about problems
Mostafa Masri
@thefakeweed
Jan 22 2017 17:20 UTC
guys can you help me ? http://codepen.io/mml3b/pen/KaamPX why did the animation applied to my twitter icon but not the other icons ?
U-ways
@U-ways
Jan 22 2017 17:24 UTC
@mml3b
  <a "target="_blank" id="twitter"  href="https://twitter.com/mostafamasrileb"><i class="fa fa-twitter" aria-hidden="true"></i></a> <!--- Look at your target attribute! Syntax error -->
  <a target="_blank" id="facebook"  href="https://facebook.com/i27.o.o.1"><i class="fa fa-facebook" aria-hidden="true"></i></a>
  <a target="_blank" id="google"  href="https://google.com/+thefakeweed"><i class="fa fa-google" aria-hidden="true"></i></a>
Mostafa Masri
@thefakeweed
Jan 22 2017 17:26 UTC
http://codepen.io/mml3b/pen/KaamPX but still didnt work
ig
i missed the "
anybody?
U-ways
@U-ways
Jan 22 2017 17:37 UTC

@mml3b Sorry just saw this. (Make sure you tag me when you reply)
You can use the CSS :hover Selector to write your own hover transition effects.

Example:

a:hover i { /*hover = when you mouse over them.*/
  transition: all;
  color: rgba(0, 0, 0, 0.86);
}
Mostafa Masri
@thefakeweed
Jan 22 2017 17:38 UTC
@U-ways i didnt get it dude , why my code didnt work ?
Amit Patel
@AmitP88
Jan 22 2017 17:42 UTC
hey guys, I was wondering, when creating a website, how do you organize your CSS code? do you do it according to the order of sections? or do you do it alphabetically?
Mostafa Masri
@thefakeweed
Jan 22 2017 17:46 UTC
http://codepen.io/mml3b/pen/KaamPX can somebody explain why my icons are working without the animation code and the colors disappeared @U-ways
and why did my photo size get bigger ?
Sorin Ruse
@sorinr
Jan 22 2017 17:48 UTC
@AmitP88 i try to group properties by functionality
Mostafa Masri
@thefakeweed
Jan 22 2017 17:49 UTC
SOMEBODY :'(
Amit Patel
@AmitP88
Jan 22 2017 17:50 UTC
@sorinr do you mean like which functionalities appear first in the website?
i'm most concerned about the ordering of css chunks that pertain to sections
U-ways
@U-ways
Jan 22 2017 17:50 UTC

@mml3b Use classes intead of IDs for your icon selectors:

.twitter {color: blue;} /** Don't forget to change id="twitter" to class="twitter" as well **/
.facebook {color: purple;}
.google {color: red;}

The reason for this is because ID selectors have a higher cascade values than classes and as a result overlapping class styles.

@mml3b Read this article to understand what am talking about (a bit complex though) https://css-tricks.com/specifics-on-css-specificity/
Sorin Ruse
@sorinr
Jan 22 2017 17:52 UTC
@AmitP88 i mean like display type, dimensions, margins and padding, positioning, font related, animation, etc
Cduffy098
@Cduffy098
Jan 22 2017 17:52 UTC
can someone tell me how to add an image in the centre of my page for my html?
Sorin Ruse
@sorinr
Jan 22 2017 18:02 UTC
@Cduffy098 u can use flexbox or if using bootstrap row col combination you can use offsets
Mercy Manrique
@mers89
Jan 22 2017 18:02 UTC
Is anyone familiar with making parallax images responsive??? Please message me
aimee-katherine
@aimee-katherine
Jan 22 2017 18:08 UTC
@KD158 just make it up =)
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:12 UTC
@mml3b analyze your HTML and CSS in codepen, it will help get you back on track
aimee-katherine
@aimee-katherine
Jan 22 2017 18:13 UTC
The tribute page was a piece of cake for me, and this personal portfolio page is a total mess. My paddings are overlapping no matter what I do. We're supposed to "reverse engineer" the example pages. I'm not sure that we got all the tools to reverse engineer the example through the FCC challenges up to this point.....? Or did we?
Mostafa Masri
@thefakeweed
Jan 22 2017 18:14 UTC

HTML Inspector warnings:

The classes text-primary (1) bg-warning (1) bg-success (1) contact (1) fa (3) fa-twitter (1) fa-facebook (1) fa-google (1) gallery (1) center-block (1) img-circle (1) are used in the HTML but not found in any stylesheet. Since you have external stylesheets, you can probably ignore this.

<meta> elements inside <body> must contain the 'itemprop' attribute.
The <center> element is obsolete and should not be used.
'"target' is not a valid attribute of the <a> element.
'"target' is not a valid attribute of the <a> element.
'"target' is not a valid attribute of the <a> element.

this apperared @TylerMoeller
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:14 UTC
@aimee-katherine You're supposed to try and build it from the ground up without looking at the example page code
aimee-katherine
@aimee-katherine
Jan 22 2017 18:14 UTC
@TylerMoeller I know, what I'm asking is were all the tools taught through the challenges in order to do this?
Sorin Ruse
@sorinr
Jan 22 2017 18:15 UTC
@aimee-katherine you have to read also on your on and turn back to the project and make changes as you learn new things
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:16 UTC
@aimee-katherine No, the example portfolio is written in languages that aren't taught at Free Code Camp
Pug, PostCSS
aimee-katherine
@aimee-katherine
Jan 22 2017 18:16 UTC
I just think that the projects should be more aligned to the lessons.
As a brand new coder, it's frustrating.
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:17 UTC
Yeah, they kind of give you a basic foundation and then throw you into the deep end to learn how to put it all together
@mml3b Yes, these warnings will give you something to start investigating to figure out what's going on with your code:
<meta> elements inside <body> must contain the 'itemprop' attribute.
The <center> element is obsolete and should not be used.
'"target' is not a valid attribute of the <a> element.
'"target' is not a valid attribute of the <a> element.
'"target' is not a valid attribute of the <a> element.
Some errors in your CSS too that will help you fix the color issues
Sorin Ruse
@sorinr
Jan 22 2017 18:19 UTC
@aimee-katherine its hard to make you in a few lessons to learn all you need. giving u a challenge will force you to try to learn more how to solve problems you encounter :)
Bigyan Karki
@bigyankarki
Jan 22 2017 18:22 UTC
can anyone give me psudo code for how to change background image according to weather?
Sorin Ruse
@sorinr
Jan 22 2017 18:25 UTC
@bigyankarki you can create a var backgrounds = {"sunny": "url to sunny pict", "cloudy": "url to cloudy img", etc} and in js depending on the weather condition display one image or another
aimee-katherine
@aimee-katherine
Jan 22 2017 18:25 UTC
Have you completed the personal portfolio webpage? I did look at the source code, and I would never copy that because I can't even come close to understanding it. It is way more advanced than what has been taught so far, they even go as far as using a whole language that hasn't even been mentioned before! Seriously, I understand learning on my own, but when it's to this extreme it really makes me question this program. The tribute page was a fair project. This is not. Sorry for the rant. I'm done.
Bigyan Karki
@bigyankarki
Jan 22 2017 18:27 UTC
so should we use indexOf?
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:28 UTC
@aimee-katherine They've given you the foundation you need, now it's time to read the bootstrap documentation and learn how to put the foundation to use. A few hours reading the docs will help you get going on the portfolio. They set an expectation of 50hrs to complete the tribute page and portfolio. It will be a challenge - the first big challenge you face in this course.
Sorin Ruse
@sorinr
Jan 22 2017 18:28 UTC
@aimee-katherine think what u need for that project: a navigation menu on top of page and some sections on your page that your menul will point to
aimee-katherine
@aimee-katherine
Jan 22 2017 18:29 UTC
@TylerMoeller Sure...although using a language that has not even been mentioned- I would hardly call that giving me a foundation.
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:30 UTC
@aimee-katherine They do that so you don't go and copy/paste - it forces you to build the site from the ground up
They do not want you reverse engineering the code
aimee-katherine
@aimee-katherine
Jan 22 2017 18:30 UTC
@TylerMoeller I thought reverse engineering were the directions.
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:31 UTC
@aimee-katherine No, definitely not.
Try to do it from scratch on your own

There used to be a rule mentioned for the project that said "Rule #1: Don't look at the sample project's source code", now it looks like it just says:

There are many great portfolio templates out there already. However, you should consider building your portfolio page as much as you can from the ground up. Using Bootstrap can help make this process much easier for you.

aimee-katherine
@aimee-katherine
Jan 22 2017 18:33 UTC
@TylerMoeller "Reverse engineer the functionality" It's at 1:36https://www.freecodecamp.com/challenges/build-a-personal-portfolio-webpage
Taylor
@treddson
Jan 22 2017 18:33 UTC
I think what @aimee-katherine is talking about is rule #3 "Reverse engineer the example project's functionality, and also feel free to personalize it"
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:34 UTC
@aimee-katherine The functionality, meaning, the link clicks, the responsive portfolio images, etc. Not the code.
That can be confusing
Taylor
@treddson
Jan 22 2017 18:34 UTC
yeah, FCC might want to clear that bit up. I can see how it's super misleading.
Also, if our only "portfolio" to date is the tribute page we've made, how can we be expected to put together an entire portfolio of all our work?
monkeyfingerz
@monkeyfingerz
Jan 22 2017 18:36 UTC
i'm still working on my portfolio page and i found some helpful websites that helped explain things, such as the nav bar. http://www.w3schools.com/css/css_navbar.asp
aimee-katherine
@aimee-katherine
Jan 22 2017 18:36 UTC
@treddson @TylerMoeller @sorinr Alright, thanks guys. I guess I'll spend hours teaching myself, and hopefully eventually find a program that actually teaches you what you need before throwing projects at you. Al the best.
CamperBot
@camperbot
Jan 22 2017 18:36 UTC
aimee-katherine sends brownie points to @treddson and @tylermoeller and @sorinr :sparkles: :thumbsup: :sparkles:
:star2: 1366 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
:star2: 1126 | @sorinr |http://www.freecodecamp.com/sorinr
:cookie: 123 | @treddson |http://www.freecodecamp.com/treddson
aimee-katherine
@aimee-katherine
Jan 22 2017 18:37 UTC
@monkeyfingerz thanks. Yes, good site.
CamperBot
@camperbot
Jan 22 2017 18:37 UTC
aimee-katherine sends brownie points to @monkeyfingerz :sparkles: :thumbsup: :sparkles:
:cookie: 119 | @monkeyfingerz |http://www.freecodecamp.com/monkeyfingerz
monkeyfingerz
@monkeyfingerz
Jan 22 2017 18:37 UTC
don't give up on it. it just takes a little outside researching to piece the portfolio page together. try to make little challenges out of the overall challenge and slowly but surely it will come together.
Taylor
@treddson
Jan 22 2017 18:38 UTC
@aimee-katherine I definitely recommend sticking with FCC. I've tried so many other routes and FCC has by far the most cut and dry tutorials and best resources (ie. this chat room) where you can get instant feedback.
Bigyan Karki
@bigyankarki
Jan 22 2017 18:41 UTC
that so ture @treddson
Taylor
@treddson
Jan 22 2017 18:43 UTC

@TylerMoeller Thought you might have some input about my question:

If our only "portfolio" to date is the tribute page we've made, how can we be expected to put together an entire portfolio of all our work?

Luke Sallmen
@LukeSallmen
Jan 22 2017 18:43 UTC
@aimee-katherine I spent many many hours researching outside of FCC - and that's to be expected. Researching is a big part of any compsci project.
@TylerMoeller You can just have filler pictures and/or links
Taylor
@treddson
Jan 22 2017 18:45 UTC
@LukeSallmen @aimee-katherine Very true. There are many resources outside of FCC that will aide you along. You just have to be efficient and think outside the box.
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:45 UTC
@treddson The portfolio is a work in progress, it will be the last thing you update before getting your front end certificate
Taylor
@treddson
Jan 22 2017 18:47 UTC
@TylerMoeller So even though it immediately follows the Tribute page, it's not expected to be completed until the very end? I should still click "I've completed this challenge" to move on?
also, thanks for the feedback! @TylerMoeller
CamperBot
@camperbot
Jan 22 2017 18:47 UTC
treddson sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:star2: 1367 | @tylermoeller |http://www.freecodecamp.com/tylermoeller
Tyler Moeller
@TylerMoeller
Jan 22 2017 18:49 UTC
@treddson Yes, click the 'I've completed this challenge" and move on.
You'll likely want to redesign the portfolio significantly after completing your final front end project
I rewrote mine from the ground up (but don't let that deter you!)
Taylor
@treddson
Jan 22 2017 19:00 UTC
@TylerMoeller Awesome. Thank you!
CamperBot
@camperbot
Jan 22 2017 19:00 UTC
treddson sends brownie points to @tylermoeller :sparkles: :thumbsup: :sparkles:
:warning: treddson already gave tylermoeller points
Tyler Moeller
@TylerMoeller
Jan 22 2017 19:02 UTC
np, good luck :+1: Lots of people here to help along the way.
Gururaj Birajdar
@grajsb
Jan 22 2017 19:16 UTC
@jdtdesigns Thanks a lot that worked for me...
CamperBot
@camperbot
Jan 22 2017 19:16 UTC
grajsb sends brownie points to @jdtdesigns :sparkles: :thumbsup: :sparkles:
:cookie: 874 | @jdtdesigns |http://www.freecodecamp.com/jdtdesigns
abhijith shenoy
@shenoyabhijith
Jan 22 2017 19:17 UTC
help i need a way to parse this api
CamperBot
@camperbot
Jan 22 2017 19:17 UTC
no wiki entry for: i need a way to parse this api
abhijith shenoy
@shenoyabhijith
Jan 22 2017 19:17 UTC
i'm stuck any help would be awesome
Cduffy098
@Cduffy098
Jan 22 2017 20:55 UTC
im stuck could someone tell me how to add an image? cuz I keep getting an x and no images appearing
ehutchllew
@ehutchllew
Jan 22 2017 20:59 UTC
@shenoyabhijith parse from string to number?
abhijith shenoy
@shenoyabhijith
Jan 22 2017 21:00 UTC
i wanna embed my seach into api
how can i split and merge the api
Moisés Man
@moigithub
Jan 22 2017 21:01 UTC
what u mean by split and merge the api ?? can u write some examples ?? how the final result should looks like ?
abhijith shenoy
@shenoyabhijith
Jan 22 2017 21:02 UTC
@moigithub im talking about variable api in my code
not api :smile:
Moisés Man
@moigithub
Jan 22 2017 21:04 UTC
explain urself.. whats the inputs and output ?
what u have.. what kind of modificatins u do.. and after modify how it should looks like ?
CamperBot
@camperbot
Jan 22 2017 21:04 UTC
no wiki entry for: urself whats the inputs and output what u have what kind of modificatins u do and after modify how it should looks like
abhijith shenoy
@shenoyabhijith
Jan 22 2017 21:09 UTC
i want to add my search content and replace the text in api
and merge and call @moigithub
Moisés Man
@moigithub
Jan 22 2017 21:11 UTC
soo u have .. something like
api = "something"
another variable like..
text = "aaaa"
and replace api with both strings...
api = api + text
@moigithub
whats wrong with my .val function
Md. Abu Taher
@entrptaher
Jan 22 2017 21:18 UTC
I should not just paste the codes like that.
Moisés Man
@moigithub
Jan 22 2017 21:18 UTC
@shenoyabhijith if u using jquery..... it should be $('some selector')
.. also ur input text name is search
and the variable u have declared on ur code is
var search =
soo this wont work
console.log($search);
abhijith shenoy
@shenoyabhijith
Jan 22 2017 21:23 UTC
not working
Moisés Man
@moigithub
Jan 22 2017 21:24 UTC
@shenoyabhijith did u modified ur code ?? and saved ??
cuz i still seeing the same things/errors
i dint save here you go
@moigithub
Moisés Man
@moigithub
Jan 22 2017 21:26 UTC
if u name ur variable.. boooo
then on another part of ur code u should also use boooo
u cant add extra characters to it.. that will make a DIFFERENT variable
$search = $('input[name=search]').val();
var api = api+search+joiner;
abhijith shenoy
@shenoyabhijith
Jan 22 2017 21:31 UTC
@moigithub thanks helped a lot
CamperBot
@camperbot
Jan 22 2017 21:31 UTC
shenoyabhijith sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 2576 | @moigithub |http://www.freecodecamp.com/moigithub
Cduffy098
@Cduffy098
Jan 22 2017 21:42 UTC
https://codepen.io/cduffy098/pen/EZmEjM could someone tell me why the image will not insert here?
Michael Schmidt
@lafisrap
Jan 22 2017 21:53 UTC
The URL seems to be not complete. Maybe png or jpg missing?
@Cduffy098
Hello911
@Hello911
Jan 22 2017 21:54 UTC
I need help with javascript object look up! Can anyone help here?
Michael Schmidt
@lafisrap
Jan 22 2017 21:54 UTC
@Cduffy098 png oak missing!
@Hello911 you have some code?
Hello911
@Hello911
Jan 22 2017 21:55 UTC

function phoneticLookup(val) {
var result = "";

// Only change code below this line

var lookup={
"alpha":"Adams",
"bravo":"Boston",
"charlie":"Chicago",
"delta":"Denver",
"echo":"Easy",
"foxtrot":"Frank"

};
// Only change code above this line
return result;
}

Michael Schmidt
@lafisrap
Jan 22 2017 21:55 UTC
@Cduffy098 png is missing.
Hello911
@Hello911
Jan 22 2017 21:55 UTC
My problem is how do I use val in my object lookup?
Cduffy098
@Cduffy098
Jan 22 2017 21:55 UTC
oh
err
YES
@lafisrap thank you!
CamperBot
@camperbot
Jan 22 2017 21:56 UTC
:cookie: 265 | @lafisrap |http://www.freecodecamp.com/lafisrap
cduffy098 sends brownie points to @lafisrap :sparkles: :thumbsup: :sparkles:
Michael Schmidt
@lafisrap
Jan 22 2017 21:56 UTC
@Hello911 you don't set the result variable.
result = lookup[val];
Hello911
@Hello911
Jan 22 2017 21:57 UTC
I know. But the object as it is look disconnected from the rest
But the computer doesnt know what val is in the object?
I use result=lookup.val;
Michael Schmidt
@lafisrap
Jan 22 2017 21:58 UTC
The function phoneticLookup should be called from below. Did you paste the full code?
@Hello911
Hello911
@Hello911
Jan 22 2017 21:59 UTC

// Setup
function phoneticLookup(val) {
var result = "";

// Only change code below this line

var lookup={
"alpha":"Adams",
"bravo":"Boston",
"charlie":"Chicago",
"delta":"Denver",
"echo":"Easy",
"foxtrot":"Frank"

};

result=lookup.val;
// Only change code above this line
return result;
}

// Change this value to test
phoneticLookup("charlie");

Michael Schmidt
@lafisrap
Jan 22 2017 21:59 UTC
@Hello911
@Hello911
Hello911
@Hello911
Jan 22 2017 21:59 UTC
I am here.
Michael Schmidt
@lafisrap
Jan 22 2017 21:59 UTC
@Hello911 you
Hello911
@Hello911
Jan 22 2017 21:59 UTC
Yeah?
YEah?
Michael Schmidt
@lafisrap
Jan 22 2017 22:00 UTC
I'm on mobile. It fucks with me...
You could also place the object outside the function. Would be better. Then it is not called every time.
@Hello911 Did you post the full code?
Hello911
@Hello911
Jan 22 2017 22:01 UTC
Yes
How do the computer match val to "charlie", "alpha", "bravo"...
?
Michael Schmidt
@lafisrap
Jan 22 2017 22:02 UTC
I overlooked that phoneticLookup is called. All is good. Just set the result.
result = lookup[val];
Hello911
@Hello911
Jan 22 2017 22:04 UTC
Interesting. that works. But why doesnt result=lookup.val; work?
I thought the two interchangable
Michael Schmidt
@lafisrap
Jan 22 2017 22:07 UTC
Because then val is interpreted as property. It looks
For property val instead of charlie, etc
Hello911
@Hello911
Jan 22 2017 22:12 UTC
@lafisrap But when you enter into the function charlie, charlie is assigned to val. So it looks for charlie basically.
No?
Michael Schmidt
@lafisrap
Jan 22 2017 22:13 UTC
Only of you write it [val], not if you write it .val
.val is the same as ["val"]
Hello911
@Hello911
Jan 22 2017 22:16 UTC
OK that explains it. Thanks
Martín Comito
@aguantincho
Jan 22 2017 22:20 UTC
Hello! I want to align the image to the right and place text to its left. Can somebody help me? I try and fail
https://codepen.io/aguantincho/pen/RKVKqZ
Michael Schmidt
@lafisrap
Jan 22 2017 22:22 UTC
@Hello911 if you write @lafisrap Thanks then I get a Brownie ;-)
CamperBot
@camperbot
Jan 22 2017 22:22 UTC
:cookie: 209 | @hello911 |http://www.freecodecamp.com/hello911
lafisrap sends brownie points to @hello911 :sparkles: :thumbsup: :sparkles:
James
@09JDPhil
Jan 22 2017 22:31 UTC
@aguantincho using the css property float should work for you. set float:right on the image and float:left on the text. assuming the the width of either div isn't set higher than 50% it should work
Martín Comito
@aguantincho
Jan 22 2017 22:32 UTC
I´ll try it, thanks @09JDPhil !
CamperBot
@camperbot
Jan 22 2017 22:32 UTC
aguantincho sends brownie points to @09jdphil :sparkles: :thumbsup: :sparkles:
:cookie: 323 | @09jdphil |http://www.freecodecamp.com/09jdphil
Martín Comito
@aguantincho
Jan 22 2017 22:41 UTC
Another question: May I use colums in bootstrap to mantain the content separate?
Or is there any other method?
Michael Schmidt
@lafisrap
Jan 22 2017 22:53 UTC
@aguantincho I don't unserstand the question. You use columns to separate content horizontally, rows vertically.
Martín Comito
@aguantincho
Jan 22 2017 22:57 UTC
Hi @lafisrap I'm trying to keep the text to the left and the image to the right without making contact between them
I cannot make it works
Cduffy098
@Cduffy098
Jan 22 2017 23:16 UTC
Guys, quick question but how would I reposition an image? say to put it in the centre under my title and sub-title