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
:star2: 1232 | @skycoder01 |http://www.freecodecamp.com/skycoder01
margin-left: 160px;
center-block
class to your image to center it
<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
max-width: 1200px
for your container. http://codepen.io/skycoder/pen/NjjXqy
<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>
:warning: reeson55 already gave skycoder01 points
:warning: reeson55 already gave skycoder01 points