These are chat archives for codefellows/sea-c16-javascript

11th
Jul 2014
Joaquin Guardado
@macikokoro
Jul 11 2014 00:42
@joeelsey Awesome I will check it out.
Joe Elsey
@joeelsey
Jul 11 2014 00:56
There may be better resources. I'm still trying to wrap my head around the other js libraries as well. I've briefly read up on them, but I don't necessarily understand what they do other than provide different methods you wouldn't have in vanilla js.
sunny yuen
@yuens1002
Jul 11 2014 01:42
why is this true. typeof([array]) // returns an "object"
Hank Yates
@hankyates
Jul 11 2014 01:44
because javascript is weird :-(
thats why libs like lodash/underscore are so important
Jeff Adelman
@jeffadelman8
Jul 11 2014 01:44
:+1:
sunny yuen
@yuens1002
Jul 11 2014 01:48
hahahahha.....but if you do array.length you get a #, you do {object}.length you get undefine. i'd really starting to like this thing. kind funny
Hank Yates
@hankyates
Jul 11 2014 01:48
right but just checking the length could mean String#length
sunny yuen
@yuens1002
Jul 11 2014 01:50
i'm trying get a sense of how i would use call() or apply() in the homework given
i'm thinking maybe the isDead can be part of the the call() as an argument????
Hank Yates
@hankyates
Jul 11 2014 01:51
hmm. close but thats not quite it
sunny yuen
@yuens1002
Jul 11 2014 01:51
person.call(Joe, isDead);
Hank Yates
@hankyates
Jul 11 2014 01:51
you can call isDead from within isAlive
Joaquin Guardado
@macikokoro
Jul 11 2014 04:03
@ivanoats Hi Ivan can I ask you a quick question?
Matt
@mahenry926
Jul 11 2014 05:47
Am I the only one who thinks there's a much better way than a case statement for isdead?
Hmm, just noticed the messages for different cases. i guesss in that case ... lol
Arielle Wilson
@jwarielle
Jul 11 2014 05:55
Used if else statements and now it works like a charm. Thanks for the input.
Joaquin Guardado
@macikokoro
Jul 11 2014 06:29
Anyone ever heard of prototype
Hank Yates
@hankyates
Jul 11 2014 06:29
oh yeah
@jwarielle nice!
@macikokoro i didnt cover it on wednesday but Martin did in his class
so a couple of the students from his class are using it in their assignments
no worries though. we are going to cover it in more depth
Joaquin Guardado
@macikokoro
Jul 11 2014 06:31
@hankyates I was thinking of implementing it in my assignment
Joaquin Guardado
@macikokoro
Jul 11 2014 06:31
@hankyates I'm having trouble with the concept of parent
Hank Yates
@hankyates
Jul 11 2014 06:32
whatcha mean parent?
or give a snippet of code for an example
sunny yuen
@yuens1002
Jul 11 2014 06:32
allows you to add another method to this
Joaquin Guardado
@macikokoro
Jul 11 2014 06:32
as in the assignment asks for Create a classification of an object that describes a person in Javascript. It's constructor should take a name, parent name, and optional age. The object should have a #isDead method that returns a boolean based on if the age is set or not.
parent name
Hank Yates
@hankyates
Jul 11 2014 06:33
gotcha
its just a string
var hank = new Person('hank', 'kathy', 29);
kathy being my mother
sunny yuen
@yuens1002
Jul 11 2014 06:47
@hankyates i'm having a lot of difficulty understanding the MDN stuff that talks about parent child constructor calling etc... is it possible to go over this monday?
Hank Yates
@hankyates
Jul 11 2014 06:47
yeah sure!
just grab me at lab time
you mean on the object oriented article?
sunny yuen
@yuens1002
Jul 11 2014 06:48
yes. the language is very confusing....
Hank Yates
@hankyates
Jul 11 2014 06:48
javascript?
yeah its not like traditional languages
sunny yuen
@yuens1002
Jul 11 2014 06:51
the language the MDN author uses to explanation the concepts
Joaquin Guardado
@macikokoro
Jul 11 2014 06:52
I have trouble with MDN too but sometimes all it takes is reading it over again :)
Matt
@mahenry926
Jul 11 2014 06:53
I'll say that the writing in the MDN is ... unpleasant. I'm already thinking of going in there and putting it into proper english
Hank Yates
@hankyates
Jul 11 2014 06:53
yeah i had to re-read the re-intro to javascript a couple of times
@mahenry926 hahaha
Joaquin Guardado
@macikokoro
Jul 11 2014 06:55
Does anyone know the difference between git push -u origin master and git push origin master?
Hank Yates
@hankyates
Jul 11 2014 07:04
i think -u sets the upstream or something
Joaquin Guardado
@macikokoro
Jul 11 2014 07:06
Then is better to use git push origin master?
Hank Yates
@hankyates
Jul 11 2014 07:06
i think git push origin master is easier to type
so i type that
Joaquin Guardado
@macikokoro
Jul 11 2014 07:07
hahaha! good answer
Hank Yates
@hankyates
Jul 11 2014 07:07
yeah -u sets the upstream
This message was deleted
   git push [--all | --mirror | --tags] [-n | --dry-run] [--receive-pack=<git-receive-pack>]
              [--repo=<repository>] [-f | --force] [-v | --verbose] [-u | --set-upstream]
              [<repository> [<refspec>...]]
This message was deleted
Joe Elsey
@joeelsey
Jul 11 2014 22:55
Anyone know a good way to divide by zero in js without getting a null?