get help in general - we have more specialized help rooms here: https://gitter.im/FreeCodeCamp/home
https://api.twitch.tv/kraken/streams/freecodecamp?callback=?&client_id=putyouridhere
burinson sends brownie points to @sjames1958gm :sparkles: :thumbsup: :sparkles:
:star2: 8430 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
advanceStep
method, you are allocating a new Array
and I wondered if that was being handled in a way that might cause memory usage to increase?
sgoldber61 sends brownie points to @janshah :sparkles: :thumbsup: :sparkles:
:cookie: 508 | @janshah |http://www.freecodecamp.com/janshah
.list-group-item-action:active {
background-color: #553693;
color: white;
}
gingerchew sends brownie points to @piteto :sparkles: :thumbsup: :sparkles:
:cookie: 47 | @piteto |http://www.freecodecamp.com/piteto
.list-group-item-action:hover,
.list-group-item-action:focus,
.list-group-item-action:active {
background-color: #553693;
color: white;
}
```<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Basics</title>
<link rel="stylesheet" type="text/css" href="bootstrap.css">
</head>
<body>
<nav class="navbar navbar-default">
sdfds
</nav>
</body>
</html>```
trellowhoomer sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1686 | @heroiczero |http://www.freecodecamp.com/heroiczero
darrenfj sends brownie points to @just1witness :sparkles: :thumbsup: :sparkles:
:cookie: 318 | @just1witness |http://www.freecodecamp.com/just1witness
TO
email address.
just1witness sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2005 | @darrenfj |http://www.freecodecamp.com/darrenfj
function destroyer(arr) {
var newArray = Array.prototype.slice.call(arguments, 1);
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Below is the code from pluralsight tutorial which let me dwell in a confusion.
As far as i know
$(function() { ... });
is equivalent to$(document).ready(function() { ... });
So why in the 2nd line of the code there is another $(function(){});
$(document).ready(function() {
$(function(){
$('#showPhoneNav').click(function() {
$("#myNav").slideToggle('normal',function(){ //Shows Nav area
if ($('#myNav').is(':visible')) {
$('#showPhoneNav').text('Hide Navigation');
} else {
$('#showPhoneNav').text('Show Navigation');
} //end of if
}); //end of slidetoggle
}); //end of myNav
}); //end showPhoneNav
}); //end of ready
https://codepen.io/nicolaimagnussen/pen/YxgVqa
What happened here?
This is why I dont have patience for CSS, what did I do wrong, why is the image making the grey div dissapear?
function translatePigLatin(str) {
str = str.split("");
if(str[0] == "A"||str[0] == "E"||str[0] == "I"||str[0] == "O"||str[0] == "U"||str[0] == "a"||str[0] == "e"||str[0] == "i"||str[0] == "o"||str[0] == "u"){
str.push("w");
str.push("a");
str.push("y");
return str.join("");
}
for(let i=0; i < str.length; i++){
if(str[i] == "A"||str[i] == "E"||str[i] == "I"||str[i] == "O"||str[i] == "U"||str[i] == "a"||str[i] == "e"||str[i] == "i"||str[i] == "o"||str[i] == "u"){
for(let b = 0; b < i; b++){
str.push(str[b]);
str.splice(str[b], 1);
if(b == i){
str.push("a");
str.push("y");
}
break;
}
}
}
return str.join("");
}
translatePigLatin("california");
if(str[i] == "A"||str[i] == "E"||str[i] == "I"||str[i] == "O"||str[i] == "U"||str[i] == "a"||str[i] == "e"||str[i] == "i"||str[i] == "o"||str[i] == "u"){
str[0].match(/[aeiou]/gi);
ericmiller777 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6499 | @manish-giri |http://www.freecodecamp.com/manish-giri
var something = collection.filter(function(e, i, ar) {
return e + ' yo momma ' + i + ' yo daddy ';
});
console.log(something)
if this is my code why does the console.log (something) still equal(3) [{…}, {…}, {…}]0: {a: 1, b: 2}1: {a: 1}2: {a: 1, b: 2, c: 2}length: 3__proto__: Array(0)
function whatIsInAName(collection, source) {
// What's in a name?
var arr = [];
// Only change code below this line
var src = Object.keys(source);
console.log(src)
var something = collection.filter(function(e, i, ar) {
return e + ' yo momma ' + i + ' yo daddy ';
});
console.log(something)
// Only change code above this line
return arr;
}
whatIsInAName([{ "a": 1, "b": 2 }, { "a": 1 },
{ "a": 1, "b": 2, "c": 2 }
], { "a": 1, "c": 2 })
collection = [
{ "a": 1, "b": 2 },
{ "a": 1 },
{ "a": 1, "b": 2, "c": 2 }
]
0
:
{a: 1}
1
:
{a: 1, b: 2, c: 2}
length
:
2
daddycardona sends brownie points to @gersho :sparkles: :thumbsup: :sparkles:
:cookie: 397 | @gersho |http://www.freecodecamp.com/gersho
function myFilter(array, fn) {
var newArray = [];
for (var i = 0; i < array.length; i++) {
if (fn(array[i], i, array)){
newArray.push(array[i]);
}
}
return newArray;
}
fn(array[i], i, array)
this is calling your function with the array element, the index and the whole array.
is there something wrong in this code
nav ul:first-child a {
border-left: 1px solid rgba(255,255,255,0.4);
}
i mean is there any wrong this combination of selector?
<nav>
<ul>
<a>this</a>
<a>this too</a>
</ul>
<ul>
<a>not this</a>
</ul>
</nav>
soo inside ur nav u have multiples ul
u targeting the first.. and all a
inside that<ul>
i have multiple <li>
<ul>
<li><a>like this</a><li>
<li><a>like this</a><li>
<li><a>like this</a><li>
<li><a>like this</a><li>
<li><a>like this</a><li>
</ul>
<a>
element residing in the first <li>
element.
ul:first-child
equivalent to "first child of the ul element"??
ul
element is the first <li>
element
li:first-child
will done the job
neeldvirus sends brownie points to @moigithub :sparkles: :thumbsup: :sparkles:
:star2: 3624 | @moigithub |http://www.freecodecamp.com/moigithub