get help in general - we have more specialized help rooms here: https://gitter.im/FreeCodeCamp/home
eunipa sends brownie points to @longnt80 :sparkles: :thumbsup: :sparkles:
:cookie: 608 | @longnt80 |http://www.freecodecamp.com/longnt80
@eunipa
to wait temporarily until the file is done being saved before processing it.
That was the solution I found on StackOverflow and from node-sass github page
kbaig sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 661 | @korzo |http://www.freecodecamp.com/korzo
heroiczero sends brownie points to @korzo and @longnt80 and @darrenfj and @thekholm80 and @sjames1958gm and @khaduch and @github-henry and @manish-giri and @daddycardona :sparkles: :thumbsup: :sparkles:
:star2: 2176 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 1534 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 662 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 412 | @daddycardona |http://www.freecodecamp.com/daddycardona
:cookie: 609 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 6688 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 8608 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
:star2: 3404 | @khaduch |http://www.freecodecamp.com/khaduch
:cookie: 415 | @github-henry |http://www.freecodecamp.com/github-henry
khaduch sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1937 | @heroiczero |http://www.freecodecamp.com/heroiczero
manish-giri sends brownie points to @heroiczero and @khaduch and @darrenfj and @github-henry and @diomed :sparkles: :thumbsup: :sparkles:
:star2: 1939 | @heroiczero |http://www.freecodecamp.com/heroiczero
:cookie: 416 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 2177 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 5233 | @diomed |http://www.freecodecamp.com/diomed
:star2: 3405 | @khaduch |http://www.freecodecamp.com/khaduch
github-henry sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6689 | @manish-giri |http://www.freecodecamp.com/manish-giri
korzo sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1940 | @heroiczero |http://www.freecodecamp.com/heroiczero
github-henry sends brownie points to @heroiczero :sparkles: :thumbsup: :sparkles:
:star2: 1941 | @heroiczero |http://www.freecodecamp.com/heroiczero
darrenfj sends brownie points to @marmiz :sparkles: :thumbsup: :sparkles:
:star2: 1063 | @marmiz |http://www.freecodecamp.com/marmiz
darrenfj sends brownie points to @heroiczero and @khaduch and @github-henry and @diomed and @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 417 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 3406 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1942 | @heroiczero |http://www.freecodecamp.com/heroiczero
:cookie: 413 | @daddycardona |http://www.freecodecamp.com/daddycardona
:star2: 5234 | @diomed |http://www.freecodecamp.com/diomed
darrenfj sends brownie points to @sjames1958gm and @thekholm80 and @longnt80 and @korzo and @faraco :sparkles: :thumbsup: :sparkles:
:cookie: 663 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 610 | @longnt80 |http://www.freecodecamp.com/longnt80
:cookie: 389 | @faraco |http://www.freecodecamp.com/faraco
:star2: 1535 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:star2: 8609 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
darrenfj sends brownie points to @manish-giri and @dhcodes :sparkles: :thumbsup: :sparkles:
:star2: 1854 | @dhcodes |http://www.freecodecamp.com/dhcodes
:star2: 6690 | @manish-giri |http://www.freecodecamp.com/manish-giri
github-henry sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2178 | @darrenfj |http://www.freecodecamp.com/darrenfj
phoenix-burn sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 664 | @korzo |http://www.freecodecamp.com/korzo
.push()
would return you the new length of the modified array
:cookie: 359 | @dhavalc2012 |http://www.freecodecamp.com/dhavalc2012
manish-giri sends brownie points to @dhavalc2012 and @darrenfj and @heroiczero and @khaduch and @marmiz and @github-henry :sparkles: :thumbsup: :sparkles:
:star2: 1064 | @marmiz |http://www.freecodecamp.com/marmiz
:star2: 3407 | @khaduch |http://www.freecodecamp.com/khaduch
:cookie: 418 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 1943 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 2179 | @darrenfj |http://www.freecodecamp.com/darrenfj
.push()
has been written - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push?v=b
Return value
The new length property of the object upon which the method was called.
return
return
, should be the very last line in your function, because anything below the return
won't execute
return
statement on line 7
console.log
statement
gishy1 sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6691 | @manish-giri |http://www.freecodecamp.com/manish-giri
Any JavaScript developer please help me to understand this bit of code
function Employee() {
......
}
function WorkerBee() {
.......
}
// Situation 1
WorkerBee.prototype = new Employee();
// Situation 2
WorkerBee.prototype = Object.create(Employee.prototype);
Does situation 1 and situation 2 are creating the same object?
.forEach()
instead of using for
loops?
<p>Here is some text html in which will be present both the <strong>strong</strong> tags and the <em>em</em> tags.</p>
font-weight: bold;
and em font-style: italic;
[WARN] Not performing Ionic build for project type: ionic1.
cordova build android
Running command: /home/chris/helloworld/hooks/after_prepare/010_add_platform_class.js /home/chris/helloworld
add to body class: platform-android
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Detected 'adb' command at /usr/bin but no 'platform-tools' directory found near.
Try reinstall Android SDK or update your PATH to include valid path to SDK/platform-tools directory.
help please
New = 0
either before or after the inner loop
darrenfj sends brownie points to @dhavalc2012 and @phoenix-burn :sparkles: :thumbsup: :sparkles:
:cookie: 163 | @phoenix-burn |http://www.freecodecamp.com/phoenix-burn
:cookie: 360 | @dhavalc2012 |http://www.freecodecamp.com/dhavalc2012
thekholm80 sends brownie points to @darrenfj and @heroiczero and @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 2180 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 6692 | @manish-giri |http://www.freecodecamp.com/manish-giri
:star2: 1944 | @heroiczero |http://www.freecodecamp.com/heroiczero
Example:
Doesn't work ->
html:
<h1 id="hStyle"> Heading </h1>
css:
h1{
color:red;
}
html:
<h1 id="hStyle"> Heading </h1>
css:
#hStyle{
color:red;
}
h1
element to the component in App.js
, and add an h1
rule in index.css
, does it not work?
render() {
return (
<Grid>
<h1 id="titleText">{`${this.state.showing === "recent"
? "Recent"
: "Alltime"} Campers Leaderboard`}</h1>
<Button id="switchButton" bsStyle="default" onClick={this.switchBoard}>
Switch Leaderboard
</Button>
<CamperTable camplist={this.state[this.state.showing]}/>
</Grid>
);
}
}
Grid
a boostrap component
<SelfClosingElement/>
<NotSelfClosingElem></NotSelfClosingElem>
@alpox @kbaig I found the reason I think, it's because some bootstrap config overrides it, for being very generic, you can take command with "!important" tho, if you really need it
h1{
color:red !important;
}
thank you ^^
artbohr sends brownie points to @alpox and @kbaig :sparkles: :thumbsup: :sparkles:
:cookie: 375 | @kbaig |http://www.freecodecamp.com/kbaig
:star2: 1400 | @alpox |http://www.freecodecamp.com/alpox
h1
because the id is less general. - The article i sent you tells you how the specificy is calculated - so it tells you how specific the selector has to be to override other rules
!important
should only be used if you have absolutely no other choice - or for strict utility classes
not
to include in the returned substring.
substring(str.length-4,str.length-1)
the 4 here should be target.length so that any target will work.substring(str.length - target.length)
var d = substring(str.length - target.length)
daddycardona sends brownie points to @heroiczero and @korzo and @longnt80 and @darrenfj and @thekholm80 and @sjames1958gm and @khaduch and @github-henry and @manish-giri :sparkles: :thumbsup: :sparkles:
:cookie: 611 | @longnt80 |http://www.freecodecamp.com/longnt80
:star2: 8612 | @sjames1958gm |http://www.freecodecamp.com/sjames1958gm
:star2: 1536 | @thekholm80 |http://www.freecodecamp.com/thekholm80
:cookie: 665 | @korzo |http://www.freecodecamp.com/korzo
:cookie: 419 | @github-henry |http://www.freecodecamp.com/github-henry
:star2: 2181 | @darrenfj |http://www.freecodecamp.com/darrenfj
:star2: 3408 | @khaduch |http://www.freecodecamp.com/khaduch
:star2: 1945 | @heroiczero |http://www.freecodecamp.com/heroiczero
:star2: 6693 | @manish-giri |http://www.freecodecamp.com/manish-giri
thekholm80 sends brownie points to @daddycardona :sparkles: :thumbsup: :sparkles:
:cookie: 414 | @daddycardona |http://www.freecodecamp.com/daddycardona
function truthCheck(collection, pre) {
let x = Object.keys(arguments[0]).every(function(key) {
//console.log(collection[k])
console.log(key)
if (!arguments[0].hasOwnProperty(pre)) {
return false;
} else {
return true;
}
});
console.log(x);
// Only change code above this line
return x;
}
function truthCheck(collection, pre) {
let x = Object.keys(collection[0]).every(function(key) {
//console.log(collection[k])
console.log(key);
if (!collection[0].hasOwnProperty(pre) && !collection[0][key]) {
return false;
}
});
console.log(x);
// Only change code above this line
return x;
}
[0]
out of collection I think I done that already
function spinalCase(str) {
// "It's such a fine line between stupid, and clever."
// --David St. Hubbins
str = str.replace(/[^a-z\A-Z]/g, "-");
console.log(str);
var newStr = str.toLowerCase();
return newStr;
}
spinalCase('AllThe-small Things');
Hey, guys. How can I insert a dash every time a lowercase letter is proceded by an uppercase? Can't figure it out.
This returns allthe-small-things
if (!collection[0].hasOwnProperty(pre) && !collection[0][key]) {
return false;
}
Object.keys()
collection.every()
daddycardona sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
return collection.hasOwnProperty(pre)
/[a-z](?=[A-Z])/g
d
in - abcdAe
&&
in .every
collection.every(c => /* check if c hasOwnProperty of pre and c[pre] is truthy */)
collection
is an array of objects
collection.every(c => )
, here c
will be each individual object
c.hasOwnProperty()
or c.age
, etc
abcd-A
it would return abc-A
?
function testLookAhead(str) {
return str.replace(/[a-z](?=[A-Z])/g, '-');
}
console.log(testLookAhead("helloWorld"));
"hell-World"
function testLookAhead(str) {
return str.replace(/([a-z](?=[A-Z]))/g, '$1-');
}
"hello-World"
for loop
using collection[0]
instead i will just use the the c
or in my case the word key
because that becomes the actual object and every already started the loop. Methods are so amazing when you really start understanding them. I see instead of collection.hasOwnProperty
it should bekey.hasOwnProperty
because it is the object and is looking for thru the object of key. Damn you're such a great teacher @Manish-Giri thanks for clearing that up for me took me some time to get it ;)
daddycardona sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
victorja sends brownie points to @korzo :sparkles: :thumbsup: :sparkles:
:cookie: 666 | @korzo |http://www.freecodecamp.com/korzo
burinson sends brownie points to @manish-giri :sparkles: :thumbsup: :sparkles:
:star2: 6694 | @manish-giri |http://www.freecodecamp.com/manish-giri
var newStr = str.replace(/\s+|_+/g, '-');
After what you told me, I just put this and it worked
element.addEventListener("click", getSubmit);
arguments
in an arrow function?
sort()