These are chat archives for FreeCodeCamp/Help

22nd
Oct 2018
Niraj Nandish
@Nirajn2311
Oct 22 2018 03:58
@diomed what kind of cards do you want
psyperl
@psyperl
Oct 22 2018 05:13
greetings
Anand Potukuchi
@anandpotukchi
Oct 22 2018 05:28
morning
Niraj Nandish
@Nirajn2311
Oct 22 2018 05:43
mornin
Anand Potukuchi
@anandpotukchi
Oct 22 2018 05:48
great
Last night I completed my drum machine
so now I'm redoing my random quote generator in react
Anand Potukuchi
@anandpotukchi
Oct 22 2018 05:58
@Nirajn2311 what about you
Aditya
@ezioda004
Oct 22 2018 06:05
Err cant merge, is github broken?
Niraj Nandish
@Nirajn2311
Oct 22 2018 06:44
@ezioda004 yeah github is being having issues since morning
Something about repairing a data storage system
Niraj Nandish
@Nirajn2311
Oct 22 2018 06:51
@anandpotukchi learning vue and making some cards for @diomed
Anand Potukuchi
@anandpotukchi
Oct 22 2018 07:08
@diomed I read the plot of the movie.
Am not watching the movie
Pretty much a high school romance gone wrong
Niraj Nandish
@Nirajn2311
Oct 22 2018 07:11
@anandpotukchi which movie
Anand Potukuchi
@anandpotukchi
Oct 22 2018 07:13
Sierra Burgers is a loser
*Burgess
Aditya
@ezioda004
Oct 22 2018 07:36
@Atulsinghm What have you tried?
Atulsinghm
@Atulsinghm
Oct 22 2018 07:37
var myStr = "<a href=\"http://www.example.com\" target=\"_blank\">Link</a>";
Aditya
@ezioda004
Oct 22 2018 07:37
Right now, the <a> tag in the string uses double quotes everywhere. You will need to change the outer quotes to single quotes so you can remove the escape characters.
Anand Potukuchi
@anandpotukchi
Oct 22 2018 07:38
@Atulsinghm and put your code in backticks
Aditya
@ezioda004
Oct 22 2018 07:38
Remove the backslash and change it so the string only uses single and double quotes.
Atulsinghm
@Atulsinghm
Oct 22 2018 07:43
solved
thanks
May Kittens Devour Your Soul
@diomed
Oct 22 2018 08:29

@diomed what kind of cards do you want

@Nirajn2311 vue cards

Claudio Restifo
@Marmiz
Oct 22 2018 08:38
sorry we only play black-jack in here :spades:
May Kittens Devour Your Soul
@diomed
Oct 22 2018 08:43
black jack vue?
Niraj Nandish
@Nirajn2311
Oct 22 2018 08:47
@Atulsinghm so how's your code like
Atulsinghm
@Atulsinghm
Oct 22 2018 08:48
var myStr \t; // FirstLine SecondLine \ \n ThirdLine
Niraj Nandish
@Nirajn2311
Oct 22 2018 08:50
🤯🤯🤯 - What have you done?
Okay, first tell me how will you assign a string to a variable?
Atulsinghm
@Atulsinghm
Oct 22 2018 08:50
@Nirajn2311 please reffer to the above link
Niraj Nandish
@Nirajn2311
Oct 22 2018 08:51
@Atulsinghm I did, your code is messed up. I'll help you with it but I can't say the answer, so answer the question
Okay, first tell me how will you assign a string to a variable?
Atulsinghm
@Atulsinghm
Oct 22 2018 08:53
char string[] = "text";
May Kittens Devour Your Soul
@diomed
Oct 22 2018 08:54
@Nirajn2311 did you check out how to change styling via vue
Aditya
@ezioda004
Oct 22 2018 08:55
@Atulsinghm Thats not valid JS, but is certainly more in lines with C, Java syntax.
Niraj Nandish
@Nirajn2311
Oct 22 2018 08:55
@Atulsinghm That's wrong
var variable_name_1 = 1;
var variable_name_2 = "Hello World!";
@diomed what kind of styling
May Kittens Devour Your Soul
@diomed
Oct 22 2018 08:57
like changing colors with vue
Aditya
@ezioda004
Oct 22 2018 08:58
@Atulsinghm Just to be clear, there are no variable types like int, char in JS, but there are value types, both may sound same but are very different from each other.
Niraj Nandish
@Nirajn2311
Oct 22 2018 08:58
Be more specific :cat: , the text, background, sky what
May Kittens Devour Your Soul
@diomed
Oct 22 2018 09:01
yes, I was hopingyou'd know how to change sky cloud color with vue
:smile_cat:
Niraj Nandish
@Nirajn2311
Oct 22 2018 09:08
@diomed maybe someday
Atulsinghm
@Atulsinghm
Oct 22 2018 09:12
@ezioda004 this is my code
var myStr = "FirstLine\n\Secondline\nThirdLine"; //
Niraj Nandish
@Nirajn2311
Oct 22 2018 09:13
@Atulsinghm "SecondLine" is supposed to be indented
Aditya
@ezioda004
Oct 22 2018 09:16

@Atulsinghm

FirstLinenewlinetabbackslashSecondLinenewlineThirdLine

You're missing tab character and also change Secondline to SecondLine
Anand Potukuchi
@anandpotukchi
Oct 22 2018 09:29
@ezioda004 do yo use fetch() or axios to fetch data
May Kittens Devour Your Soul
@diomed
Oct 22 2018 09:30
sudo make me @ezioda004 's favorite pet :cat:
Aditya
@ezioda004
Oct 22 2018 09:30
@anandpotukchi Both, I'd use axios in real project though (for backwards compatibility)
ezioda004 @ezioda004 pets @diomed
Anand Potukuchi
@anandpotukchi
Oct 22 2018 09:34
@ezioda004 what's the difference
May Kittens Devour Your Soul
@diomed
Oct 22 2018 09:35
purrr
Anand Potukuchi
@anandpotukchi
Oct 22 2018 09:35
just the backwards compatibility?
Aditya
@ezioda004
Oct 22 2018 09:35
@anandpotukchi fetch is new API so older browsers dont support it
Anand Potukuchi
@anandpotukchi
Oct 22 2018 09:36
hmm
Anand Potukuchi
@anandpotukchi
Oct 22 2018 09:47
@ezioda004 so which one do I use now
for my random quote machine
Aditya
@ezioda004
Oct 22 2018 09:48
Both uses promises and have similar syntax so either is fine.
May Kittens Devour Your Soul
@diomed
Oct 22 2018 09:56
@Nirajn2311 yess! I managed to write vue without errors
also - card doesnt show :disappointed:
BuntyBru
@BuntyBru
Oct 22 2018 10:04
Has anyone used Bootstrap modal?
May Kittens Devour Your Soul
@diomed
Oct 22 2018 10:04
what about it?
BuntyBru
@BuntyBru
Oct 22 2018 10:07
I am doing a bootstrap modal
which has a modal inside it too
now as soon as i close the inside modal The main modal also closes
Victor Popescu
@VicPopescu
Oct 22 2018 10:07
inception
May Kittens Devour Your Soul
@diomed
Oct 22 2018 10:08
seems like u need custom close function for 2nd modal
:|
|:
BuntyBru
@BuntyBru
Oct 22 2018 10:08
@VicPopescu hahah
@diomed apart from that any way?
May Kittens Devour Your Soul
@diomed
Oct 22 2018 10:09
IDK js, so I cant' say more
Victor Popescu
@VicPopescu
Oct 22 2018 10:09
May Kittens Devour Your Soul
@diomed
Oct 22 2018 10:09
you need to create a pen in codepen and let JS wildlings sort it out
Victor Popescu
@VicPopescu
Oct 22 2018 10:10
@BuntyBru what are you using apart from bootstrap? jquery or?
do you manually trigger close for second modal?
Niraj Nandish
@Nirajn2311
Oct 22 2018 10:11
@diomed send me a link to your vue project
BuntyBru
@BuntyBru
Oct 22 2018 10:13
@VicPopescu angular
angular 4
May Kittens Devour Your Soul
@diomed
Oct 22 2018 10:13
@Nirajn2311 no! it's too pretty for your eyes to see :yum:
what's the latest number of angular?
Victor Popescu
@VicPopescu
Oct 22 2018 10:13
7 now
May Kittens Devour Your Soul
@diomed
Oct 22 2018 10:13
good god
Victor Popescu
@VicPopescu
Oct 22 2018 10:13
stable version
May Kittens Devour Your Soul
@diomed
Oct 22 2018 10:13
Angularzilla
Victor Popescu
@VicPopescu
Oct 22 2018 10:14
@BuntyBru and you use ngx-bootstrap? or how?
Niraj Nandish
@Nirajn2311
Oct 22 2018 10:14
@diomed then I wont be able to help my favourite :cat:
BuntyBru
@BuntyBru
Oct 22 2018 10:15
@VicPopescu
bootstrap
Victor Popescu
@VicPopescu
Oct 22 2018 10:16
well, you need a wrapper for angular
how to you trigger onClose?
BuntyBru
@BuntyBru
Oct 22 2018 10:19
<div class="container">
    <div class="modal fade" id="groupManagerModal" role="dialog">
        <div class="modal-dialog">

            <!-- Modal content-->
            <div class="modal-content">
              <div class="modal-header">

                <h4 class="modal-title">Modal Header</h4>
              </div>
              <div class="modal-body">
                <p>Some text in the modal.</p>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
              </div>
            </div>

          </div>
    </div>
  </div>

@VicPopescu

i am trying to do what @diomed said

the above code is for the inner modal
as soon as i hit Close i need only the current modal to close
Victor Popescu
@VicPopescu
Oct 22 2018 10:21
I think data-dismiss="modal" is the selector for closing target
did you tried to change that to something else?
eg. modal2
BuntyBru
@BuntyBru
Oct 22 2018 10:22
@VicPopescu tried
not working
the module us not closin
have a read
BuntyBru
@BuntyBru
Oct 22 2018 10:31
@VicPopescu ok
BuntyBru
@BuntyBru
Oct 22 2018 10:44
@VicPopescu thanks mate
the problem is solved as of now, but i think overlapping modals is not a good idea
definately i am not going to repeat it in coming time
Niraj Nandish
@Nirajn2311
Oct 22 2018 10:50
@diomed did you make your card show
Victor Popescu
@VicPopescu
Oct 22 2018 11:05
@BuntyBru yes, it's bad design to have modal in modal inception
BuntyBru
@BuntyBru
Oct 22 2018 11:18

@VicPopescu
totally agreeing
I am pretty sure at the last minute the designer will say to remove it

though as of now he is saying its okay

May Kittens Devour Your Soul
@diomed
Oct 22 2018 11:42
gh.png
@Nirajn2311 no
Niraj Nandish
@Nirajn2311
Oct 22 2018 11:51
@diomed Which UI framework are you using?
Kranti Nebhwani
@darkphotonKN
Oct 22 2018 11:53
does anyone know how to color this svg? ive looked up all the tips online but it doesnt seem to work, try it on my code pen here: https://codepen.io/darkphotonKN/pen/JmBajW
Niraj Nandish
@Nirajn2311
Oct 22 2018 11:56
Is github working?
Victor Popescu
@VicPopescu
Oct 22 2018 11:56
@darkphotonKN you need to do that from css? in template html you can modify the fill property
Kranti Nebhwani
@darkphotonKN
Oct 22 2018 12:00
does it work? did you try
i think ive tried it and it didnt work
Victor Popescu
@VicPopescu
Oct 22 2018 12:00
if you modify the svg properties from html, it works
@darkphotonKN <style>.cls-1{fill:red;}.cls-2{fill:red;}</style> in svg body, in html
May Kittens Devour Your Soul
@diomed
Oct 22 2018 12:01
@Nirajn2311 tailiwind
Victor Popescu
@VicPopescu
Oct 22 2018 12:03
@darkphotonKN or if you want in css
.cls-1 {
  fill: blue!important;
}
.cls-2 {
  fill: blue!important;
}
Kranti Nebhwani
@darkphotonKN
Oct 22 2018 12:05
@VicPopescu hmm it works, so add wonder why it didnt before! thanks
wow cuz i didnt write important?
Victor Popescu
@VicPopescu
Oct 22 2018 12:05
yes
because you have an inline style
Kranti Nebhwani
@darkphotonKN
Oct 22 2018 12:06
ah gotcha thanks bud
Victor Popescu
@VicPopescu
Oct 22 2018 12:06
np, good luck!
Anand Potukuchi
@anandpotukchi
Oct 22 2018 13:31
any idea as to hy this is happening
Failed to load https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://s.codepen.io' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
BuntyBru
@BuntyBru
Oct 22 2018 13:33
how to shift the inside text of a button to right side
Suppose i have a big button
bootstrap class .btn-block
Anand Potukuchi
@anandpotukchi
Oct 22 2018 13:37
@BuntyBru apply padding
BuntyBru
@BuntyBru
Oct 22 2018 13:38
can we use float?
Anand Potukuchi
@anandpotukchi
Oct 22 2018 13:42
@BuntyBru you want to move text inside a button, why would you use float
somewhere on this page it should say - : float is used for positioning of page layout
BuntyBru
@BuntyBru
Oct 22 2018 14:03
@anandpotukchi padding is not giving desired results
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:03
please show your code
share the pen
BuntyBru
@BuntyBru
Oct 22 2018 14:05
How can we increase the opaqueness of the background while using a modal
?
@anandpotukchi that is done
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:07
@BuntyBru use opacity
Eric Weiss
@eweiss17
Oct 22 2018 14:15
@anandpotukchi there is a workaround to this error...
it may tell you within the project description
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:15
@eweiss17 working on it
Eric Weiss
@eweiss17
Oct 22 2018 14:17
huh wow they changed their projects a lot since i did them
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:17
@eweiss17 ?
Eric Weiss
@eweiss17
Oct 22 2018 14:18
you doing api projects?
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:18
haven't changed
just shuffled
nah. front-end lib
Eric Weiss
@eweiss17
Oct 22 2018 14:19
looks like you are using an api though
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:19
Today's challenge was to recreate my random quote machine in react
yeah. that project requires one
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:26
@eweiss17 mode: 'no-cors' doesnt work
Eric Weiss
@eweiss17
Oct 22 2018 14:27
I believe the problem is more based off of this Origin 'https://s.codepen.io' is therefore not allowed access
No 'Access-Control-Allow-Origin' header is present on the requested resource.
look up how to fix that when using codepen
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:29
I'' need to add new headers
Eric Weiss
@eweiss17
Oct 22 2018 14:31
maybe check out this page
looks like that problem you are having
yuenwailok
@yuenwailok
Oct 22 2018 14:32
Hi, am I allowed to ask questions that is about some programming problems in LeetCode?
Aditya
@ezioda004
Oct 22 2018 14:32
@yuenwailok Yes
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:34
@yuenwailok yes
yuenwailok
@yuenwailok
Oct 22 2018 14:35
Ok. recently I have been working in problem 347: https://leetcode.com/problems/top-k-frequent-elements/ Although it seems it recommended people to use bucket sort to solve the problem, but according to what I've found, bucket sort doesn't work faster than simply put data in dictionary and sort it normally
I am using C# stopwatch to measure the performance and I've found mine one are faster
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:37
@yuenwailok what happens to be the problem?
Aditya
@ezioda004
Oct 22 2018 14:38
@yuenwailok What algorithm are you using? Using radix, bucket sort is just one way of solving it.
yuenwailok
@yuenwailok
Oct 22 2018 14:38
https://dotnetfiddle.net/DGko4K this is the address
I just want to found out if actually mine one is faster or any reason that makes the stopwatch show that outcome
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:42
@yuenwailok there are tools to measure algorithm performance
They are called Asymptotic Notations
yuenwailok
@yuenwailok
Oct 22 2018 14:45
Thanks. But is it mean that the stopwatch is not reliable?
Anand Potukuchi
@anandpotukchi
Oct 22 2018 14:47
@yuenwailok ho. it's not
Aditya
@ezioda004
Oct 22 2018 14:47
Idk C# so I wont comment on stopwatch but as long as your algorithms complexity is nlogn or better, IMO its fine. Isnt leetcode using time restrictions? If your code passes then I wont worry about it
yuenwailok
@yuenwailok
Oct 22 2018 14:49
Thank you guys.
Anand Potukuchi
@anandpotukchi
Oct 22 2018 16:47
i've been getting a 200
whenever I try to use the API
mode: 'no-cors' isn't working
Christopher McCormack
@cmccormack
Oct 22 2018 16:49
@anandpotukchi 200 is a successful request
Anand Potukuchi
@anandpotukchi
Oct 22 2018 16:52
@cmccormack
pen.js:22 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json&json= with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.
 fetch(API,
         {
            "mode": "no-cors",
             headers: {
            "Content-Type": "application/json; charset=utf-8",
             }
    })
Let me know if you find something
night
Christopher McCormack
@cmccormack
Oct 22 2018 16:55
@anandpotukchi maybe we can help when you get back and have had time to rest on it
Anand Potukuchi
@anandpotukchi
Oct 22 2018 16:56
sounds good
one more question, is it just me or were you like this too
asking for help every time you're stuck
@cmccormack
?
Christopher McCormack
@cmccormack
Oct 22 2018 17:00
@anandpotukchi yeah pretty much, but most of mine was on Google or whatever, digging around through all the posts. I also try to read the docs on stuff like fetch real closely when I run into issues
In the chat room I usually ask questions that are hard to google for, like best way to implement something specific
Kyle Holm
@thekholm80
Oct 22 2018 17:12
learning to read & understand docs is, in my opinion, the greatest skill a dev can have
Aditya
@ezioda004
Oct 22 2018 17:15
Docs? Who dat
May Kittens Devour Your Soul
@diomed
Oct 22 2018 18:08
watdat?
@thekholm80 code me traffic light
Anand Potukuchi
@anandpotukchi
Oct 22 2018 18:10
@thekholm80 wait… there are docs? My whole life is a lie
@diomed do.it yourself
Kyle Holm
@thekholm80
Oct 22 2018 18:12
@diomed you build all the visual stuff and i'll wire it up
Aditya
@ezioda004
Oct 22 2018 18:12
@diomed
if (red) return "staph!";
else if (orange) return "stop?"
else return "no stop"
done and done
Kyle Holm
@thekholm80
Oct 22 2018 18:13
eww it's all sideways
Aditya
@ezioda004
Oct 22 2018 18:13
Stop stealing our jobs @cmccormack!
May Kittens Devour Your Soul
@diomed
Oct 22 2018 18:13
traffic light functions in my country seem to be a bit strange
Kyle Holm
@thekholm80
Oct 22 2018 18:13
do you have to bribe them?
Anand Potukuchi
@anandpotukchi
Oct 22 2018 18:14
@thekholm80
We do
And
@ezioda004 o thought meant - go, go faster and check for cops and then go
In reverse order
*I thought it meant
@diomed change to the next light every 60 seconds
Aditya
@ezioda004
Oct 22 2018 18:25
@thekholm80 Is this even possible?
Kyle Holm
@thekholm80
Oct 22 2018 18:26
from my experience, no
sometimes i can't believe i even wrote it
Aditya
@ezioda004
Oct 22 2018 18:28
Blame the guy in mirror
Christopher McCormack
@cmccormack
Oct 22 2018 18:38
@diomed here now it functions Codepen
Aita Kane
@aita-kane
Oct 22 2018 18:55
hello anyone where I can volunteer as a developper please ?
Kyle Holm
@thekholm80
Oct 22 2018 19:01
i think i've just found the ugliest thing ever
Christopher McCormack
@cmccormack
Oct 22 2018 19:01
@thekholm80 not my street light is it?
Aita Kane
@aita-kane
Oct 22 2018 19:01
@thekholm80 hello what is it?
Christopher McCormack
@cmccormack
Oct 22 2018 19:01
@aita-kane Please do not spam every channel
Kyle Holm
@thekholm80
Oct 22 2018 19:01
lol no, this provider has html inside their xml, but they've used html entities for the tags
<story_content>&lt;p&gt;Despite heavy rains that put a damper on attendance at the Arkansas State Fair earlier in the week, fair numbers increased this weekend and even had a record-breaking day Saturday.&lt;/p&gt;
i'm sure we'll parse it out fine, but it sure hurts my eyes
Christopher McCormack
@cmccormack
Oct 22 2018 19:03
hey that one FCC challenge will actually be useful for this one!
Kyle Holm
@thekholm80
Oct 22 2018 19:03
nah, i'm pretty sure our team that actually does the parsing uses php
so nothing will help them
nothing
Eric Weiss
@eweiss17
Oct 22 2018 19:11
php was created as a joke and it just went too far?
Kyle Holm
@thekholm80
Oct 22 2018 19:14
after using BeautifulSoup it's hard to imagine anyone would ever use anything else for xml/html parsing
it's just so amazing
Eric Weiss
@eweiss17
Oct 22 2018 19:15
if php is so trash, why were so many things created with it?
Kyle Holm
@thekholm80
Oct 22 2018 19:15
who said it was trash?
Eric Weiss
@eweiss17
Oct 22 2018 19:16
assuming you think that from your previous comment
Kyle Holm
@thekholm80
Oct 22 2018 19:16
you know what they say about assumptions
Aditya
@ezioda004
Oct 22 2018 19:16
You know what - PHP is a beautiful language, there I said it
Kyle Holm
@thekholm80
Oct 22 2018 19:17
i knew you'd come out of the closet one of these days
Eric Weiss
@eweiss17
Oct 22 2018 19:17
then what did you mean by
" so nothing will help them
nothing"
Kyle Holm
@thekholm80
Oct 22 2018 19:18
calm down my dude, it wasn't meant as a personal attack
Eric Weiss
@eweiss17
Oct 22 2018 19:18
i'm not flustered or angry at all?
you know what they say about assumptions
Kyle Holm
@thekholm80
Oct 22 2018 19:18
kinda sound salty to me
Eric Weiss
@eweiss17
Oct 22 2018 19:18
i'm generally just curious about why there is a general thought around developers that php is very bad
Christopher McCormack
@cmccormack
Oct 22 2018 19:19
@eweiss17 it's not bad, I think the issue is it isn't very intuitive, at least at first
Niraj Nandish
@Nirajn2311
Oct 22 2018 19:20
@eweiss17 it takes time to learn
Eric Weiss
@eweiss17
Oct 22 2018 19:21
My guess is that because PHP is a looser language (at least older versions) it is very easy for poorer devs to make code in php that works but is not well written code
Christopher McCormack
@cmccormack
Oct 22 2018 19:21
Personally it feels weird to use something that feels like a whole different language.
Aditya
@ezioda004
Oct 22 2018 19:22
Quick someone make fun of JS
Christopher McCormack
@cmccormack
Oct 22 2018 19:22
JS has funny coersions!
Eric Weiss
@eweiss17
Oct 22 2018 19:22
i go on /r/programminghumor and JS is the butt of a ton of jokes
Aditya
@ezioda004
Oct 22 2018 19:23
I go to to r/programminghumor for array jokes
Eric Weiss
@eweiss17
Oct 22 2018 19:23
arrays start at 1?
in fortran they do
Niraj Nandish
@Nirajn2311
Oct 22 2018 19:24
js
Eric Weiss
@eweiss17
Oct 22 2018 19:25
that is actually a well done meme....
the js shirt is a nice touch
Ene Catalin
@EneCatalin
Oct 22 2018 19:42
wait
it all makes sense
what's so weird about it ?
I haven't written js in ages and the conversions are logical
Aditya
@ezioda004
Oct 22 2018 19:43
Java has taken over you
Ene Catalin
@EneCatalin
Oct 22 2018 19:43
hopefully yes, ima find out soon I hope
Aditya
@ezioda004
Oct 22 2018 19:44
How does 0 == [] makes sense to you?
Ene Catalin
@EneCatalin
Oct 22 2018 19:44
still, js shouldn't get flak over those conversions, they're quite intuitive
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:44
@cmccormack that's some serious promises
Ene Catalin
@EneCatalin
Oct 22 2018 19:44
it means 0, nada, null
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:44
I didn't really mean for anyone to actually code traffic lights for real, but ooooook.... :stuck_out_tongue:
Christopher McCormack
@cmccormack
Oct 22 2018 19:45
@diomed it was an opportunity to practice, I don't like to pass those up!
Aditya
@ezioda004
Oct 22 2018 19:45
@EneCatalin Theres no falsy object in JS and [] is an object
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:45
@ezioda004 when you put [] together it kinda makes a squared digital 0. so it makes total sense
ezioda004 @ezioda004 hopes no one mentions null
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:46
2late, I guess :trollface:
Ene Catalin
@EneCatalin
Oct 22 2018 19:46
@ezioda004 that clearly refers to a, i am losing the word in english, but you know an array with 0 elements
am emtpy "array"
Aditya
@ezioda004
Oct 22 2018 19:46
@diomed Genius, did you help Brendon designing language?
Ene Catalin
@EneCatalin
Oct 22 2018 19:46
(really forgetting the mathematical term)
for me it makes total sense at least
Aditya
@ezioda004
Oct 22 2018 19:47
@EneCatalin !![] //true shouldnt it be false?
Ene Catalin
@EneCatalin
Oct 22 2018 19:47
well yes
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:47
if I wasn't diomed I'd probably call myself emtpy
Christopher McCormack
@cmccormack
Oct 22 2018 19:47
mind-blown.gif
Ene Catalin
@EneCatalin
Oct 22 2018 19:48
ok now I don't get it
why isn't it false ?
I am def missing something
Aditya
@ezioda004
Oct 22 2018 19:48
@diomed
const diomed = [];
void diomed.fill('🐱');
Christopher McCormack
@cmccormack
Oct 22 2018 19:48
>  [] == false
true
> ![] == false
true
Aditya
@ezioda004
Oct 22 2018 19:49
Lol
Ene Catalin
@EneCatalin
Oct 22 2018 19:49
yeah I am lost
Christopher McCormack
@cmccormack
Oct 22 2018 19:49
>  [] === false
false
> ![] === false
true
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:49
all in all JS is filled with logical errors, but when did that stop anyone
I mean, humans live for logical errors
Ene Catalin
@EneCatalin
Oct 22 2018 19:50
ok what's the explanation
@diomed explain, you the JS expert
Aditya
@ezioda004
Oct 22 2018 19:50
@EneCatalin Its simple! Well not really, when comparing a number to an object, toPrimitive() is called on the object, so for arrays its Number([]) which returns length of the array therefore 0 === Number([]) //true
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:51
I've explained how [] is 0 do I need to 'xplain everything?
Ene Catalin
@EneCatalin
Oct 22 2018 19:51
@ezioda004 thx
nice
Aditya
@ezioda004
Oct 22 2018 19:51
![] === false is effectively Number(!true) === Number(false)
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:51
also any number is NotaNumber!
take that, math!
Ene Catalin
@EneCatalin
Oct 22 2018 19:52
suppose subtleties like this can bite one in the ass
Aditya
@ezioda004
Oct 22 2018 19:52
@diomed Actually it is according to IEEE 754
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:53
is that code for Internet Explorer
Aditya
@ezioda004
Oct 22 2018 19:54
Close enough
Christopher McCormack
@cmccormack
Oct 22 2018 19:55
it's a shiite group that charges to read the standards
Niraj Nandish
@Nirajn2311
Oct 22 2018 19:56
@diomed still learning on how to make vue cards??
May Kittens Devour Your Soul
@diomed
Oct 22 2018 19:57
@Nirajn2311 I think I got a pretty decent example; gonna try it out just now
Niraj Nandish
@Nirajn2311
Oct 22 2018 19:58
@diomed try using vuetify
Aditya
@ezioda004
Oct 22 2018 21:20
@thekholm80 @cmccormack What would you consider some advanced JS topics? I'm looking to learn/revise JS before starting to apply for interviews.
Christopher McCormack
@cmccormack
Oct 22 2018 21:21
Symbols?
honestly I still think prototypal inheritance is one of the best things to know and you know it pretty well
I was reading this the other day and found it a good refresher
Aditya
@ezioda004
Oct 22 2018 21:22
Lol is symbols even important? I know that you can create soft private fields with it and its used in iterators but thats about it
Christopher McCormack
@cmccormack
Oct 22 2018 21:23
/shrug
React uses them a lot I know
Aditya
@ezioda004
Oct 22 2018 21:24
Ah yeah I know some prototype inheritance, I'll definitely read about that stuff again
Aditya
@ezioda004
Oct 22 2018 21:42
@cmccormack I'm reading it, a good refresher indeed, thanks
Tom Minor
@procode200
Oct 22 2018 22:25
hi
Binyamin Aron Green
@b3u
Oct 22 2018 22:28
@procode200 What's up?
Tom Minor
@procode200
Oct 22 2018 22:29
@b3u what is https://gitter.im/FreeCodeCamp/classroom-mode about ?? many people including me are wondering.
Binyamin Aron Green
@b3u
Oct 22 2018 22:30
oh. no idea. Sorry!
Tom Minor
@procode200
Oct 22 2018 22:30
how come nothing is there?
Binyamin Aron Green
@b3u
Oct 22 2018 22:31
oh. no idea. maybe its a wip.
or it's for use at a specific time.
Tom Minor
@procode200
Oct 22 2018 22:31
what do you mean by wip?
Binyamin Aron Green
@b3u
Oct 22 2018 22:32
work in progress
Tom Minor
@procode200
Oct 22 2018 22:32
oh
should i ask qunicy larson?
Aditya
@ezioda004
Oct 22 2018 22:33
@procode200 I'm guessing its related to this repo
Tom Minor
@procode200
Oct 22 2018 22:34
i see.
i do remember in the fcc faq it said they are working on tools for teachers.
Aditya
@ezioda004
Oct 22 2018 22:36
@procode200 More details here
Kyle Holm
@thekholm80
Oct 22 2018 22:51
@ezioda004 bitwise operators?
generators
Aditya
@ezioda004
Oct 22 2018 22:51
@thekholm80 I know bitwise and some tricks with them, some generators as well
Kyle Holm
@thekholm80
Oct 22 2018 22:52
hmm
Aditya
@ezioda004
Oct 22 2018 22:52
Is Proxy worth fully understanding?
I just know basics of that
Kyle Holm
@thekholm80
Oct 22 2018 22:53
not sure
i've only used it once for some silly kata
but i'm not exactly advanced