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
Gulsvi
@gulsvi
6000/month. Invite the prime minister over for dinner
Eduar Tua
@eduartua
I am 30 and many people say is too late to start in programming field
Keon Samuel
@keonsam
I don't think so @eduartua
Gulsvi
@gulsvi
30 is young
Eduar Tua
@eduartua
I am still doing my best, I am electrical engineer but love web development
Keon Samuel
@keonsam
@SkyCoder01 maybe we can collaborate.
Gulsvi
@gulsvi
I'm just going to be a student for now and see where it takes me :)
Eduar Tua
@eduartua
Languages and coding is a good combination
c0d0er2
@c0d0er2

Can somebody please help me with Replacing If Else Chains with Switch in JavaScript? Here is my code:

function chainToSwitch(val) {
  var answer = "";
  // Only change code below this line

  switch (val === "bob") {
    case 1:
      answer = "Marley";
      break;
    case 2:
      answer = "The Answer";
      break;
    case 3:
      answer = "There is no #1";
      break;
    case 4:
      answer = "Missed me by this much!";
      break;
    default:
      answer = "Ate Nine";
      break;
  }

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

// Change this value to test
chainToSwitch(7);

Here is the link: https://www.freecodecamp.com/challenges/replacing-if-else-chains-with-switch

Keon Samuel
@keonsam
@SkyCoder01 but we can make millions.
Gulsvi
@gulsvi
I would gladly work for you some day @keonsam :) have a dream job in the Caribbean
Sit on the beach, code all day. Drink rum. Sounds perfect
Keon Samuel
@keonsam
haha
Eduar Tua
@eduartua
I tried rum while coding. It didn't work for me got drunk too quickly
Gulsvi
@gulsvi
Rum is for after coding lol
Eduar Tua
@eduartua
Lol
Keon Samuel
@keonsam
probably won't want to code drunk.
Gulsvi
@gulsvi
Keon would fire us for drinking on the job
Reeson55
@Reeson55
are there any issues with using images off google for my background images on codepen for projects?
Eduar Tua
@eduartua
Use postimage.io
Gulsvi
@gulsvi
It depends on the image, some are copyright, but I doubt anyone would notice
Reeson55
@Reeson55
i mean im just using the url link
to post a background on codepen its nothing live
Eduar Tua
@eduartua
It depends on the rights as @SkyCoder01 says. If it is not a production site there will no be problems
Reeson55
@Reeson55
heres my tribute so far what do you guys think? http://codepen.io/Reeson55/pen/pPbMPN
Gulsvi
@gulsvi
image.png
@Reeson55 Good work for desktop, it should resize better for mobile :)
Reeson55
@Reeson55
@SkyCoder01 thanks, yeah not sure where to start there lol
CamperBot
@camperbot
reeson55 sends brownie points to @skycoder01 :sparkles: :thumbsup: :sparkles:
:star2: 1232 | @skycoder01 |http://www.freecodecamp.com/skycoder01
Gulsvi
@gulsvi
Click the down arrow, in the top right-hand corner of the HTML + CSS panels and select the Analyze option. It will give you some suggestions
Reeson55
@Reeson55
maybe using flex-container?
Gulsvi
@gulsvi

@Reeson55 In general, don't use large values in pixels. You can remove this to help a lot:

width:1200px;

And take advantage of bootstrap. For example, on your image, use class="img-responsive"

And remove this from the CSS for that image:
  margin-left: 160px;
Think of a phone that's 280px wide. You've just pushed it to the left by 160px, over half the width of the phone's screen
Reeson55
@Reeson55
if i do that my image wont be centered
Gulsvi
@gulsvi
image.png
Those 3 changes make it look like this instead:
Add the center-block class to your image to center it
Reeson55
@Reeson55
okay I centered image but what about the width of the container?
Lucas Mazzitelli
@duffmckagan

<html lang="en">
<head>
<title>Portfolio</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
<div class="jumbotron text-center">

<h1>Lucas Mazzitelli</h1>
<p>Full Stack Developer</p>
</div>

</body>
</html>

.jumbotron{
background-color: #f4511e;
color: #000

My css doesnt work, but when i put in the html with the tag <style></style> its works
Someone can help me?
sorry for my english, is a total crap haha

here is my pen
Gulsvi
@gulsvi
@Reeson55 If you don't want it to get too wide, but still want it to be responsive, use max-width: 1200px for your container. http://codepen.io/skycoder/pen/NjjXqy
@duffmckagan Click "Settings" in codepen and add all of this to your settings instead:
<head>
  <title>Portfolio</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
^^ And that jQuery version looks very old. Latest version is 3.2
Reeson55
@Reeson55
@SkyCoder01 is that done with css? or add a class to the element
Gulsvi
@gulsvi
@Reeson55 max-width is a CSS property