These are chat archives for FreeCodeCamp/Help

7th
Sep 2018
idris
@idris12
Sep 07 2018 00:19 UTC
hello
psyperl
@psyperl
Sep 07 2018 03:51 UTC
i wonder what happen to bob...
Bjorn van de Peut
@bjorno43
Sep 07 2018 03:54 UTC
@psyperl Right here :wave: Just needed to catch up a good amount of sleep
Kyle Holm
@thekholm80
Sep 07 2018 03:58 UTC
a day without bob is like a day without sunshine
psyperl
@psyperl
Sep 07 2018 03:59 UTC
@bjorno43 good to know you are alright.. was worried you got stressed out :p
Bjorn van de Peut
@bjorno43
Sep 07 2018 04:01 UTC
Nah. When you don't hear from me for a day, it's safe to assume I passed out from exhaustion and just catching up sleep :P
psyperl
@psyperl
Sep 07 2018 04:01 UTC
:thumbsup:
in my case , the sleep is trying to catch up with me :trollface:
Bjorn van de Peut
@bjorno43
Sep 07 2018 04:06 UTC
:joy:
psyperl
@psyperl
Sep 07 2018 04:32 UTC
atm i don't have trouble with sleeping. but my hands is hurting for too much typing lol ..
got too excited typing codes :smile:
Bjorn van de Peut
@bjorno43
Sep 07 2018 04:49 UTC
lol
I'm currently re-writing the bots source. Implementing spam prevention and fixing some issues
Karma Drukpa
@coderkarma
Sep 07 2018 04:52 UTC
nice
@psyperl keep smacking those all laptop buttons
psyperl
@psyperl
Sep 07 2018 04:54 UTC
@coderkarma smacks
Karma Drukpa
@coderkarma
Sep 07 2018 04:54 UTC
lol
that would cost expensive.
psyperl
@psyperl
Sep 07 2018 04:55 UTC
yeah i don't use laptop.. i am more of a desktop person
Karma Drukpa
@coderkarma
Sep 07 2018 05:13 UTC
ok
Bjorn van de Peut
@bjorno43
Sep 07 2018 05:15 UTC
Pff now that I'm re-writing the entire code, I'm like.. I didn't realise I wrote that many code already.. :joy:
psyperl
@psyperl
Sep 07 2018 05:18 UTC
do you realize what you wrote on the code though?
or even the language you wrote the code in :trollface: ?
Bjorn van de Peut
@bjorno43
Sep 07 2018 05:19 UTC
Nope. Just smashing the keys here as well and hoping for the best :innocent:
That'd be something.. blindly smashing your keys and actually writing working code
psyperl
@psyperl
Sep 07 2018 05:22 UTC
expert level
Karma Drukpa
@coderkarma
Sep 07 2018 05:23 UTC
expert
next level
Bjorn van de Peut
@bjorno43
Sep 07 2018 05:24 UTC

I can already see Google coming up with a coder's autocorrect:

wafn 90823u fhfj j02jf0ija

Did you mean?

console.log('Hello World!');
psyperl
@psyperl
Sep 07 2018 05:24 UTC
lol
Karma Drukpa
@coderkarma
Sep 07 2018 05:25 UTC
@bjorno43 linkedln please ?
Bjorn van de Peut
@bjorno43
Sep 07 2018 05:25 UTC
@coderkarma I don't have a linkedIn account
Karma Drukpa
@coderkarma
Sep 07 2018 05:26 UTC
oh no.. why?
Bjorn van de Peut
@bjorno43
Sep 07 2018 05:26 UTC
Never got arround in creating one
I'm at the level where ppl find me without one :trollface:
Karma Drukpa
@coderkarma
Sep 07 2018 05:28 UTC
oh. okay.
:smile:
Bjorn van de Peut
@bjorno43
Sep 07 2018 05:28 UTC
Nah I'll create one soon. I'll pass you the link once it's done
psyperl
@psyperl
Sep 07 2018 05:31 UTC
i haven't even put my name in ( github/fcc).. my cert still saying 'psyperl' on the holder lol
Karma Drukpa
@coderkarma
Sep 07 2018 05:32 UTC
@bjorno43 sure, that sounds good. @psyperl that doesn't sound good.
@psyperl pass me yours
psyperl
@psyperl
Sep 07 2018 05:33 UTC
i'll put it in once i got more certs :D, no point doing it now
you can tag me on github instead for now @coderkarma
Karma Drukpa
@coderkarma
Sep 07 2018 05:34 UTC
okay lol
const translatePositionWithOffsetOfElement guess who named this variable?
psyperl
@psyperl
Sep 07 2018 05:38 UTC
lol not me i hope
was it me? hahaha
Karma Drukpa
@coderkarma
Sep 07 2018 05:38 UTC
yes
lol
alright, I am off to bed now. have a good rest of your day or night wherever you folks live.
psyperl
@psyperl
Sep 07 2018 05:40 UTC
sleep well @coderkarma
Karma Drukpa
@coderkarma
Sep 07 2018 05:40 UTC
have to wake up early at 6 always
that's why i had to go bed early. lol
@psyperl thanks
Munaf
@munaf5a1_gitlab
Sep 07 2018 06:07 UTC
Using the type attribute selector, try to give the checkboxes in CatPhotoApp a top margin of 10px and a bottom margin of 15px.
?
input[type='radio'] {
margin-top:10px;
margin-bottom:10px;
}
why it is not working?
May Kittens Devour Your Soul
@diomed
Sep 07 2018 06:14 UTC
@munaf5a1_gitlab name of the task, pls
Munaf
@munaf5a1_gitlab
Sep 07 2018 06:15 UTC
Basic CSS: Use Attribute Selectors to Style Elements
Using the type attribute selector, try to give the checkboxes in CatPhotoApp a top margin of 10px and a bottom margin of 15px.
May Kittens Devour Your Soul
@diomed
Sep 07 2018 06:16 UTC
@munaf5a1_gitlab it says try to give checkboxes
Bjorn van de Peut
@bjorno43
Sep 07 2018 06:16 UTC
Well you're supposed to give checkboxes the margin
May Kittens Devour Your Soul
@diomed
Sep 07 2018 06:16 UTC
you are giving it to radio still
potato - potato
xD
ok tomato
Munaf
@munaf5a1_gitlab
Sep 07 2018 06:16 UTC
got it
thanks
@bjorno43 thanks i understood
May Kittens Devour Your Soul
@diomed
Sep 07 2018 06:17 UTC
here's a correct solution, for future use
Screenshot_15.png
Anand Potukuchi
@anandpotukchi
Sep 07 2018 06:44 UTC
are they challenhes from angular times still available
Aditya
@ezioda004
Sep 07 2018 06:56 UTC
@anandpotukchi Angular times?
Anand Potukuchi
@anandpotukchi
Sep 07 2018 06:56 UTC
yeah fcc used angular back in 2012
Aditya
@ezioda004
Sep 07 2018 07:00 UTC
Google says FCC was founded in 2014
psyperl
@psyperl
Sep 07 2018 07:01 UTC
not 1934?
Aditya
@ezioda004
Sep 07 2018 07:03 UTC
FCC was one of the program to run on a turning mahcine
~wiki
Anand Potukuchi
@anandpotukchi
Sep 07 2018 07:56 UTC
oh
not sure about the year but they did angular before
Anand Potukuchi
@anandpotukchi
Sep 07 2018 08:17 UTC
I don't iderstand something
a few american phone numbers jave letters
like (785) 045-REPO
can anyon explain
Claudio Restifo
@Marmiz
Sep 07 2018 08:27 UTC

@anandpotukchi it's a trick they use to remeber them easily.
I think it's linked to the fact that old phones used to have the letters on numbers.

So you should know each number which letters holds. That's why I still have my old Nokia :smile:

Anand Potukuchi
@anandpotukchi
Sep 07 2018 08:28 UTC
aha
nice
Claudio Restifo
@Marmiz
Sep 07 2018 08:29 UTC
so was like 2 = ABC / 3 = DEF and so on
Aditya
@ezioda004
Sep 07 2018 08:29 UTC
Just a mnemonic technique
Claudio Restifo
@Marmiz
Sep 07 2018 08:29 UTC
i 'member making ringtones by pressing the numbers :cry:
Aditya
@ezioda004
Sep 07 2018 08:30 UTC
Composing ringtones on nokia was pretty cool
Claudio Restifo
@Marmiz
Sep 07 2018 08:31 UTC
I can't brain. There's a way to loop in JSX that is not on an array?
otherwise I just createElement()
can't be bothered
May Kittens Devour Your Soul
@diomed
Sep 07 2018 08:49 UTC
call 1-800-APPLE
do I press 2 times for 2nd letter or what
Aditya
@ezioda004
Sep 07 2018 08:54 UTC
Yeah
psyperl
@psyperl
Sep 07 2018 09:39 UTC
wew i fell asleep
Sidou
@sidou01
Sep 07 2018 10:00 UTC
Hi can someone help me with a react problem ?
May Kittens Devour Your Soul
@diomed
Sep 07 2018 10:03 UTC
purrrhaps
Sidou
@sidou01
Sep 07 2018 10:03 UTC
thanks i created this similar code to my project's problem that will show it
import React, { Component } from 'react'

function fun() {
    alert('hello')
}
class Form extends Component {
    constructor(props) {
        super(props)
        this.state = {
            name : ''
        }
    }
   onSubmit = (e, fun) => {
       fun()
   } 
   onChange = (e) => {
       this.setState({name : e.target.value})
   }
    render() {
        return (
            <div>
                <form onSubmit ={this.onSubmit.bind(fun)}>
                    <label htmlFor = "name">Name:</label>
                    <input type = "text" onChange = {this.onChange.bind(this)} value = {this.state.name} />

                    <input type= "submit" value = "add" />
                </form>
                <h1>{this.state.name}</h1>

            </div>
        )
    }
}

export default Form
i'm having problems with onSubmit
when this renders that fun won't be executed and the linters doesn't show any errors
i'm rendering this Component in another file btw
psyperl
@psyperl
Sep 07 2018 10:27 UTC
i think someone just scared the cat
alpox
@alpox
Sep 07 2018 10:35 UTC
@sidou01
onSubmit = (e, fun) => {
   e.preventDefault();
   fun()
}
@sidou01 The bind is not necessary btw. you can just use onSubmit={this.onSubmit}
Because you already use an arrow function
May Kittens Devour Your Soul
@diomed
Sep 07 2018 10:43 UTC
@psyperl I never said I was gonna help. I just encourage people to post, so they could get help :smirk_cat:
subhashish negi
@subhashish12
Sep 07 2018 11:25 UTC
how to filter elements from large array of objects in js i am using for each for now
Anand Potukuchi
@anandpotukchi
Sep 07 2018 11:43 UTC
what's wrong with this:
function Dog(name, numLegs) {
  this.name = name;
}

Dog.prototype.numLegs = 4;

let beagle = new Dog("Snoopy");

let ownProps = [];
let prototypeProps = [];

// Add your code below this line 

for (let property in Dog) {
  if(Dog.hasOwnProperty(property)) {
    ownProps.push(property);
  } else {
    prototypeProps.push(property);
  }
}
psyperl
@psyperl
Sep 07 2018 11:53 UTC
what about it?
oh
iteration should be on the object not the class @anandpotukchi
psyperl
@psyperl
Sep 07 2018 11:59 UTC
typeof Dog // 'function'
Anand Potukuchi
@anandpotukchi
Sep 07 2018 11:59 UTC
thanks @psyperl
psyperl
@psyperl
Sep 07 2018 11:59 UTC
:thumbsup:
@subhashish12 try filter
Adam Jacks
@AdamHJ123
Sep 07 2018 12:29 UTC
Hey guys, I need some advice
I've been offered a job as a front end developer but they want to know what salary I expect
I've worked as a junior front end dev for 1 year and 2 months for £1600 whicgh I believe was way too low pay
£16,000*
I would like £20,000 but I don't know if that's too high
I'm a good dev, I write good code but I'm not too speedy
Eric Weiss
@eweiss17
Sep 07 2018 12:31 UTC
what is the average in pounds for a software dev
Adam Jacks
@AdamHJ123
Sep 07 2018 12:32 UTC
Any advice for what I should say?
Eric Weiss
@eweiss17
Sep 07 2018 12:32 UTC
16,000 for 14 months seems real low
Adam Jacks
@AdamHJ123
Sep 07 2018 12:32 UTC
£28,000 according to Goggle
Google*
Do you think I'd be overstepping if I said £20,000?
Eric Weiss
@eweiss17
Sep 07 2018 12:33 UTC
No, if you are happy with that say that
Adam Jacks
@AdamHJ123
Sep 07 2018 12:33 UTC
Baring in mind that I'd me commuting 30 miles there and back
Eric Weiss
@eweiss17
Sep 07 2018 12:33 UTC
they will counter offer you if they think it is too high
Adam Jacks
@AdamHJ123
Sep 07 2018 12:34 UTC
That's what I'm hoping for but I don't want to put them off
Eric Weiss
@eweiss17
Sep 07 2018 12:34 UTC
have you looked at what the salary is for the company on sites like glassdoor
Adam Jacks
@AdamHJ123
Sep 07 2018 12:34 UTC
I have another interview lined up for a company with a better portfolio but I'm going to see what tgis company says in the mean time
I've looked on Glassdoor, they seem low
They have a really bad review stating they don't do quality work which I'm aware of, their designs and portfolio in general are rubbish
Eric Weiss
@eweiss17
Sep 07 2018 12:38 UTC
you can see how long they will wait on when you can give a definitive response
go to that other interview, tell them that you have a company waiting for your response, that may prompt them to hire you more quickl
sense you have already worked as a junior for a year, i believe you can be a bit more selective
all up to you though
Adam Jacks
@AdamHJ123
Sep 07 2018 12:40 UTC
Ye the other company haven't starting interviews yet however
They're an Australian company startinf an office in the UK
I'll email that company asking how soon the interviews will start as I have an offer from another company however I prefer their portfolio
Cheers buddy
Bjorn van de Peut
@bjorno43
Sep 07 2018 13:30 UTC
@AdamHJ123 I honestly believe it to be very low. A decent software engineer makes around 60.000 Euro / year. That would be around 53.600 Pound. A junior software engineer makes around 35.000 / 40.000 Euro. So that'd be around 31.200 / 35.700 Pound. Obviously depending on the national income it might be different. But 20.000 sounds to me like it's barely above minimum wage
May Kittens Devour Your Soul
@diomed
Sep 07 2018 13:33 UTC
A five ounce bird could not carry a one pound coconut
Bjorn van de Peut
@bjorno43
Sep 07 2018 13:34 UTC
@AdamHJ123 You should always aim high, but not too high. Like if the national average is 27.000, go for 25.000. That way you're showing confidence, but remain reasonable. If you aim too low, they either think you're insecure or that you're cheap labor for them. Neither is a good situation for you to be in.
Eric Weiss
@eweiss17
Sep 07 2018 13:36 UTC
@bjorno43 send those to @AdamHJ123
Bjorn van de Peut
@bjorno43
Sep 07 2018 13:36 UTC
@eweiss17 Oops! My bad :joy:
@AdamHJ123 See above ^
Anand Potukuchi
@anandpotukchi
Sep 07 2018 13:41 UTC
People need help
function Animal() { }

Animal.prototype = {
  constructor: Animal, 
  eat: function() {
    console.log("nom nom nom");
  }
};

// Add your code below this line

let duck =  Object.create(Animal.prototype); // Change this line
let beagle = = Object.create(Animal.prototype); // Change this line

function Animal() { }
Animal.prototype.eat = function() {
  console.log("nom nom nom");
};

let animal = new Animal();
let animal = Object.create(Animal.prototype);

animal.eat(); // prints "nom nom nom"
animal instanceof Animal;
Kyle Holm
@thekholm80
Sep 07 2018 13:43 UTC
@bjorno43 you look different
May Kittens Devour Your Soul
@diomed
Sep 07 2018 13:46 UTC
he rejuvenated himself
Kyle Holm
@thekholm80
Sep 07 2018 13:47 UTC
@diomed x
May Kittens Devour Your Soul
@diomed
Sep 07 2018 13:48 UTC
OMG, instant regret. haha :smirk_cat:
Anand Potukuchi
@anandpotukchi
Sep 07 2018 13:51 UTC
any ideas
i need help on this challenge
Bjorn van de Peut
@bjorno43
Sep 07 2018 13:53 UTC
@thekholm80 Ye I've changed my picture to a better one
Kyle Holm
@thekholm80
Sep 07 2018 13:53 UTC
@ke1echi const { property: { anotherProperty: variableName } } = object;
@anandpotukchi did you link the right challenge? your code doesn't look anything like what i'm seeing in the lesson
psyperl
@psyperl
Sep 07 2018 13:59 UTC
@bjorno43 you don't look stoned anymore hahaha
Anand Potukuchi
@anandpotukchi
Sep 07 2018 13:59 UTC
sorry
  function Animal() { }

  Animal.prototype = {
    constructor: Animal, 
    eat: function() {
      console.log("nom nom nom");
    }
  };

  // Add your code below this line

  let duck =  Object.create(Animal.prototype); // Change this line
  let beagle = = Object.create(Animal.prototype); // Change this line

  function Animal() { }
  Animal.prototype.eat = function() {
    console.log("nom nom nom");
  };

  let animal = new Animal();
  let animal = Object.create(Animal.prototype);

  animal.eat(); // prints "nom nom nom"
  animal instanceof Animal;
May Kittens Devour Your Soul
@diomed
Sep 07 2018 13:59 UTC
@anandpotukchi not enough WestWorld
Kyle Holm
@thekholm80
Sep 07 2018 14:01 UTC
@anandpotukchi i still don't know what challenge you're working on
Kelechi Chinaka
@ke1echi
Sep 07 2018 14:03 UTC
i still dont understand this destruction
why cant i just do object reference LOCAL_FORECAST.tomorrow.max
Kyle Holm
@thekholm80
Sep 07 2018 14:04 UTC
inside the function you should use the function parameter name, which is forecast in this case
ehutchllew
@ehutchllew
Sep 07 2018 14:04 UTC
@anandpotukchi What are you trying to achieve? beagle is declared incorrectly, and you're declaring animal twice, once by constructor, another by cloning/
Kyle Holm
@thekholm80
Sep 07 2018 14:04 UTC
and you can do it with dot notation, but that's not destructuring
Kelechi Chinaka
@ke1echi
Sep 07 2018 14:05 UTC
yea
never use destruction before now
ehutchllew
@ehutchllew
Sep 07 2018 14:06 UTC
@ke1echi Destructuring is a way to unpack an object's values into 'variables'
@ehutchllew so in your LOCAL_FORECAST.tomorrow.max you can create a variable like this const { max } = LOCAL_FORECAST.tomorrow so now you can use max instead of LOCAL_FORECAST.tomorrow.max everytime you want to use the value associated with that property.
Kelechi Chinaka
@ke1echi
Sep 07 2018 14:11 UTC
so i can do this?
const { maxOfTomorrow } = LOCAL_FORECAST.tomorrow.max
Kyle Holm
@thekholm80
Sep 07 2018 14:11 UTC
not if you want to pass the challenge
ehutchllew
@ehutchllew
Sep 07 2018 14:11 UTC
@ke1echi depends, is max an object?
with that syntax, you can only unpack values from an object
what is the value associated with LOCAL_FORECAST.tomorrow.max? I'm thinking it's just a number.
if you want to rename your destructured value youc an do this: const { max: maxOfTomorrow } = LOCAL_FORECAST.tomorrow.max
Kyle Holm
@thekholm80
Sep 07 2018 14:14 UTC
that would mean the object would have to be structured LOCAL_FORECAST = { tomorrow: { max: { max: value} } }
also, you're still telling him to use the global variable instead of the function parameter
ehutchllew
@ehutchllew
Sep 07 2018 14:15 UTC
me? what?
Kyle Holm
@thekholm80
Sep 07 2018 14:16 UTC
have you looked at the challenge?
and passed it?
ehutchllew
@ehutchllew
Sep 07 2018 14:16 UTC
no, i'm just answering his question about destructuring.
Kelechi Chinaka
@ke1echi
Sep 07 2018 14:16 UTC
so much unnecessary syntactic sugars in js
ehutchllew
@ehutchllew
Sep 07 2018 14:16 UTC
I mean you don't have to use destructuring, it's just extremely helpful imo.
Kyle Holm
@thekholm80
Sep 07 2018 14:16 UTC
oh dear
he wants to solve a challenge that specifically asks him to use nested destructuring
Anand Potukuchi
@anandpotukchi
Sep 07 2018 14:17 UTC
@ke1echi so what @ke1echi needs to e done
I reset thechalenge
ehutchllew
@ehutchllew
Sep 07 2018 14:18 UTC
okay so just do const { tomorrow: {max} } = LOCAL_FORECAST
Kyle Holm
@thekholm80
Sep 07 2018 14:18 UTC
closer
just missing the new variable name, and using the function parameter instead of the global variable
ehutchllew
@ehutchllew
Sep 07 2018 14:19 UTC
Ooooh
i gotcha
Kyle Holm
@thekholm80
Sep 07 2018 14:20 UTC
the tests are specific
ehutchllew
@ehutchllew
Sep 07 2018 14:21 UTC
I don't htink I've ever actually done a dynamic destructuring with function parameters, would it just be like const { [param] } = someObject ?
Kelechi Chinaka
@ke1echi
Sep 07 2018 14:21 UTC
@ke1echi const { property: { anotherProperty: variableName } } = object;
i dont understand what you meant here @thekholm80
Kyle Holm
@thekholm80
Sep 07 2018 14:22 UTC
@ke1echi if you have an object object = { property: { anotherProperty: value } } and you want to assign anotherProperty to varialbleName then you would destructure it as const { property: { anotherProperty: variableName } } = object;
that puts the value stored in anotherProperty into a new variable called variableName
in your function getMaxOfTmrw() there's a function parameter called forecast that is structured similarly
i hate nested destructuring btw. it's so ugly
ehutchllew
@ehutchllew
Sep 07 2018 14:26 UTC
yeah, i've never used nested destructuring
doesn't really seem to be any benefit
Kyle Holm
@thekholm80
Sep 07 2018 14:26 UTC
i use it a lot in callbacks and function declarations, but it's still ugly
like here i used it so i can pass one object into the function but have it all sorted into variables inside the function
ehutchllew
@ehutchllew
Sep 07 2018 14:32 UTC
@thekholm80 so forgive my ignorance, but what is the benefit to using nested destructuring if you aren't declaring default values?
Kyle Holm
@thekholm80
Sep 07 2018 14:32 UTC
for me it's convenience
ehutchllew
@ehutchllew
Sep 07 2018 14:33 UTC
oh wait i see how it could work
nice
Kyle Holm
@thekholm80
Sep 07 2018 14:34 UTC
i mean, in the code above i could have async(_, params, context) { then down in the code either refer to things as context.mongo.Users or destructure somewhere inside the function itself
but that's more work and i'm lazy
in classes i often destructure this that way, too because i get tired of writing this. a million times in every method
ehutchllew
@ehutchllew
Sep 07 2018 14:36 UTC
yeah, i mainly write in react, so i do a lot of desctucturing for props and state.
Kyle Holm
@thekholm80
Sep 07 2018 14:37 UTC
that's a good use-case too
Kelechi Chinaka
@ke1echi
Sep 07 2018 14:37 UTC
const { tomorrow: { max: maxOfTomorrow}} = LOCAL_FORECAST
what am i doing wrongly? @thekholm80
Kyle Holm
@thekholm80
Sep 07 2018 14:37 UTC
use forecast instead of LOCAL_FORECAST
inside the function you should use the function parameter, not the global variable
then you should pass
Kelechi Chinaka
@ke1echi
Sep 07 2018 14:39 UTC
thanks @thekholm80
do you always use destructuring or normal object reference?
Kyle Holm
@thekholm80
Sep 07 2018 14:40 UTC
more often than not
i get tired of writing out the full dot notation if i have to write it more than one or two times
and it looks cleaner
psyperl
@psyperl
Sep 07 2018 14:42 UTC
i am staring at the code for an hour and not typing anything yet wew
is this thing common?
Kyle Holm
@thekholm80
Sep 07 2018 14:42 UTC
@psyperl when was the last time you slept?
psyperl
@psyperl
Sep 07 2018 14:42 UTC
i have sleep , i forgot though.. this morning i think
Kyle Holm
@thekholm80
Sep 07 2018 14:42 UTC
lol
more coffee then
psyperl
@psyperl
Sep 07 2018 14:42 UTC
wait i feel asleep earlier not long ago
lol
good idea.. i am actually making one atm
Aditya
@ezioda004
Sep 07 2018 14:55 UTC
:coffee:
psyperl
@psyperl
Sep 07 2018 15:02 UTC
SUPERSUNFUSK
@SUPERSUNFUSK
Sep 07 2018 15:14 UTC
brothers good night
Kelechi Chinaka
@ke1echi
Sep 07 2018 16:12 UTC
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals/
// change code below this line
  const resultDisplayArray = [];
  resultDisplayArray.push(`<li class="text-warning">${result.failure[0]}</li>`);
   resultDisplayArray.push(`<li class="text-warning">${result.failure[1]}</li>`)
   resultDisplayArray.push(`<li class="text-warning">${result.failure[2]}</li`);
  // change code above this line
what am i doing wrong?
Bjorn van de Peut
@bjorno43
Sep 07 2018 16:16 UTC
@ke1echi You're using a constant there. A constant cannot be changed after it has been declared. So it's not possible to push new values to it. You should use let instead of const if you want to change the value of the variable, array or object later on in your code.
Aditya
@ezioda004
Sep 07 2018 16:17 UTC
No..const doesnt mean constant sadly, objects can be mutated.
Bjorn van de Peut
@bjorno43
Sep 07 2018 16:18 UTC
@ezioda004 Seriously? That's just wrong..
Aditya
@ezioda004
Sep 07 2018 16:22 UTC
@ke1echi The argument passed is result.failure as arr to the function so you'll need to usearr[0] and so on
Also the last line has > missing in </li
@bjorno43 Yeah, this is JS :D
Kyle Holm
@thekholm80
Sep 07 2018 16:32 UTC
@bjorno43 it does prevent changing an array into a string or something though, so it's not a total loss
May Kittens Devour Your Soul
@diomed
Sep 07 2018 16:33 UTC
True git
Kelechi Chinaka
@ke1echi
Sep 07 2018 16:35 UTC
thanks @ezioda004
Karma Drukpa
@coderkarma
Sep 07 2018 16:36 UTC

coffeeeeeeeee....

May Kittens Devour Your Soul
@diomed
Sep 07 2018 16:43 UTC
I look forward to day when :cat:s like Manticore will be in movies
Kelechi Chinaka
@ke1echi
Sep 07 2018 16:43 UTC
my eyes become heavy to see :smile: @ezioda004
Aditya
@ezioda004
Sep 07 2018 16:47 UTC
You need sugar and caffeine
@thekholm80 It can be cheated
const a = [1, 2, 3];
{
  const a = "abc";
}
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:14 UTC

@ezioda004 quick! without looking

.red {
  color: red;
}

.blue {
  color: blue;
}

Which color would these divs be?

<div class="red blue">
<div class="blue red">
Aditya
@ezioda004
Sep 07 2018 17:16 UTC
Both blue?
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:16 UTC
you looked :yum:
Aditya
@ezioda004
Sep 07 2018 17:16 UTC
I didnt
But I'll check now
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:17 UTC
you're winning!
Eric Weiss
@eweiss17
Sep 07 2018 17:17 UTC
no color because the div contains nothing
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:17 UTC
you know stuff @ezioda004
@eweiss17 touché
Aditya
@ezioda004
Sep 07 2018 17:19 UTC
@diomed Most of the time in browser stuff executes from top to bottom, so its 1 rule to remember
Alexander R Bott
@Abott1222
Sep 07 2018 17:20 UTC
lol
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:20 UTC
true that. they got me and most of others on order of classes
Eric Weiss
@eweiss17
Sep 07 2018 17:20 UTC
in php... something like
echo "Hey this is my variable $var"
and
echo 'Hey this is my variable $var'
is a different result
Aditya
@ezioda004
Sep 07 2018 17:25 UTC
Thats PHP for you
Niraj Nandish
@Nirajn2311
Sep 07 2018 17:25 UTC
@diomed I finished jack Ryan
Kyle Holm
@thekholm80
Sep 07 2018 17:26 UTC
@ezioda004 don't the {} create new scope?
Niraj Nandish
@Nirajn2311
Sep 07 2018 17:26 UTC
They built up the plot but the ending was not good
Eric Weiss
@eweiss17
Sep 07 2018 17:26 UTC
I actually hear that the newer version of PHP are actually pretty good
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:27 UTC
@Nirajn2311 damn, man. I'm on ep 2 today. lol
hope you liked it
Aditya
@ezioda004
Sep 07 2018 17:27 UTC
@thekholm80 It does, to confuse even more, this doesnt work
const a = "abc";
{
  const a = a.split(""); //Error
}
@Nirajn2311 I watched it too, felt like I wasted 8hrs on nothing
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:29 UTC
I guess they'll make season2
yeah, it's already renewed, so...
Eric Weiss
@eweiss17
Sep 07 2018 17:29 UTC
spend 8 hours watching a show to determine that it sucked?
Well... i'v already watched the first episode... might as well finish the season
Aditya
@ezioda004
Sep 07 2018 17:29 UTC
It was either that or doing something productive, I choose the former
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:30 UTC

Well... i'v already watched the first episode... might as well finish the season

that's nice way of thinking

Aditya
@ezioda004
Sep 07 2018 17:30 UTC
It was more like..ok stuff is getting good..ok it sucked but they might do better next episode
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:30 UTC
this is what I'm doing with Purge from now on
Eric Weiss
@eweiss17
Sep 07 2018 17:33 UTC
fair enough i'v had that before
i'v stopped watching a show after 100+ episodes too though because it got bad
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:34 UTC
@eweiss17 Lost was not bad, damnit
Eric Weiss
@eweiss17
Sep 07 2018 17:34 UTC
it was the anime hunter x hunter if u know what that is
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:34 UTC
I am aware of that
Aditya
@ezioda004
Sep 07 2018 17:34 UTC
I'd expect nothing less from :cat:
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:34 UTC
but I can hardly stand anime
Eric Weiss
@eweiss17
Sep 07 2018 17:35 UTC
i went from hating anime, to watching dubbed, to watching subbed
it's whatever, the weebs ruin it though
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:38 UTC
Harry Potter is now 20 ys old book
i do
"use strict";
import * as capString from capitalize_strings;
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:40 UTC
When I look @ chocolate I hear 2 voices in my head.
First one says : *You  need to eat that chocolate.*
The other voice goes: *You heard. Eat the chocolate.*
Eric Weiss
@eweiss17
Sep 07 2018 17:40 UTC
where di that come from?
Kyle Holm
@thekholm80
Sep 07 2018 17:41 UTC
@ke1echi need quotes around capitalize_strings
Kelechi Chinaka
@ke1echi
Sep 07 2018 17:41 UTC
oh :laughing:
thanks @thekholm80
Aditya
@ezioda004
Sep 07 2018 17:42 UTC
Double quotes, single quotes are buggy IIRC
Kyle Holm
@thekholm80
Sep 07 2018 17:42 UTC
:+1:
yeah, it wouldn't pass for me with single quotes
Aditya
@ezioda004
Sep 07 2018 17:42 UTC
The people making the test suites should try Regex section sometime
Eric Weiss
@eweiss17
Sep 07 2018 17:42 UTC
has anyone done the node.js/mongodb challenges on fcc?
Aditya
@ezioda004
Sep 07 2018 17:43 UTC
Yes
Kelechi Chinaka
@ke1echi
Sep 07 2018 17:43 UTC
different ascii values @thekholm80
Aditya
@ezioda004
Sep 07 2018 17:44 UTC
Thats true but JS interprets single and double quotes the same, so its not a real world problem
Kyle Holm
@thekholm80
Sep 07 2018 17:45 UTC
yeah, they use regex to parse the user-generated code. they just need to expand their test to include ['|"]
Eric Weiss
@eweiss17
Sep 07 2018 17:47 UTC
I tried doing the node.js challenges a couple months ago and they were just straight up broken
Aditya
@ezioda004
Sep 07 2018 17:48 UTC
Hmm I did like few weeks ago, they were working
Eric Weiss
@eweiss17
Sep 07 2018 17:49 UTC
did you use glitch i believe it was called
Aditya
@ezioda004
Sep 07 2018 17:50 UTC
Yeah
May Kittens Devour Your Soul
@diomed
Sep 07 2018 17:50 UTC
@thekholm80 do you know the power of LA CHANCLA, coz these girls srly do
Kyle Holm
@thekholm80
Sep 07 2018 17:51 UTC
googled 'la chancla' and it was exactly what i hoped
Kelechi Chinaka
@ke1echi
Sep 07 2018 18:02 UTC
yeah, they use regex to parse the user-generated code. they just need to expand their test to include ['|"]
since node is written in c/c++ '' is used to refer to a char @thekholm80
i guess they didnt just like '' lol
Eric Weiss
@eweiss17
Sep 07 2018 18:07 UTC
is that spaghetti code?
Kyle Holm
@thekholm80
Sep 07 2018 19:22 UTC
@diomed x
Otter
@lambomiura
Sep 07 2018 19:25 UTC
Hey, I'm building my first chrome extension (don't know much about backend), how can I host JSON file (small list of links with images) that I will update sometimes. Guess I need to make my own API? What is the easiest way?
Aditya
@ezioda004
Sep 07 2018 19:28 UTC

@thekholm80

If it looks like a chicken, acts like a chicken, it must be a chicken

@lambomiura Making an express server wont be that hard, I guess you can use firebase too
Kyle Holm
@thekholm80
Sep 07 2018 19:30 UTC
or indexedDB if you don't need all your users to get updates
@ezioda004 i'm not sure what that article is talking about
Aditya
@ezioda004
Sep 07 2018 19:37 UTC
Me neither, I just remember that phrase :D
This indexedDB API looks interesting
Kyle Holm
@thekholm80
Sep 07 2018 19:38 UTC
i've never used it, but i like the idea of it
Aditya
@ezioda004
Sep 07 2018 19:38 UTC
Its basically like a DB in client side?
Kyle Holm
@thekholm80
Sep 07 2018 19:39 UTC
yes
i imagine it makes working with PWAs a lot better
psyperl
@psyperl
Sep 07 2018 20:05 UTC
what is PWA?
-- progressive web app
psyperl
@psyperl
Sep 07 2018 20:12 UTC
don't people think by this time soft eng already have enough terms, soon or later we won't have enough letter to put on a new term in 3 letters abbreviation
Kyle Holm
@thekholm80
Sep 07 2018 20:17 UTC
lol idk
Allen Francis
@lallenfrancisl
Sep 07 2018 20:55 UTC
Are there any text editors which are like sublime that are open source. Other than visual studio code since it is electron app
psyperl
@psyperl
Sep 07 2018 20:56 UTC
netbeans eclipse? are they still around not sure.. what is wrong with electron app?
Kyle Holm
@thekholm80
Sep 07 2018 20:56 UTC
vs code and atom are my favs, but they're both electron
maybe notepad++?
BuntyBru
@BuntyBru
Sep 07 2018 21:00 UTC
@thekholm80
whats up
Kyle Holm
@thekholm80
Sep 07 2018 21:01 UTC
hey buddy
how's life?
BuntyBru
@BuntyBru
Sep 07 2018 21:01 UTC
nm mate
psyperl
@psyperl
Sep 07 2018 21:11 UTC
codepen is my fav editr :D
Kyle Holm
@thekholm80
Sep 07 2018 21:13 UTC
lol :trollface:
BuntyBru
@BuntyBru
Sep 07 2018 21:23 UTC
i love this group
<3
BuntyBru
@BuntyBru
Sep 07 2018 21:32 UTC
<3
Karma Drukpa
@coderkarma
Sep 07 2018 21:53 UTC
me to
lol
Kyle Holm
@thekholm80
Sep 07 2018 21:53 UTC
:yellow_heart:
Karma Drukpa
@coderkarma
Sep 07 2018 21:54 UTC
I love these folks @thekholm80 @ezioda004 @psyperl @bjorno43 etc many more
Niraj Nandish
@Nirajn2311
Sep 07 2018 22:01 UTC
Whats the best way to update npm packages
Or do we have to individually do npm update <package-name>
Kyle Holm
@thekholm80
Sep 07 2018 22:01 UTC
packages you've published, or packages you're using?
Niraj Nandish
@Nirajn2311
Sep 07 2018 22:01 UTC
packages I'm using
Kyle Holm
@thekholm80
Sep 07 2018 22:02 UTC
if they're local packages npm update if they're global, npm -g update or you can go package by package with npm update [-g] <package>
Niraj Nandish
@Nirajn2311
Sep 07 2018 22:03 UTC
Thx
Niraj Nandish
@Nirajn2311
Sep 07 2018 22:03 UTC
Idiot, I should have checked the docs before I asked
Kyle Holm
@thekholm80
Sep 07 2018 22:04 UTC
sometimes i like asking for a quick answer instead of spending hours searching through docs
but npm's docs are pretty good