This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Javascript: 101

My recent threads

You haven't posted any discussions yet.

Recently updated threads

week2 assignment

Edoardo Batini's picture
Edoardo Batini
Tue, 2011-02-08 01:23

function lifeUniverseEverything () {
return 42;
}

String.prototype.lifeUniverseEverything=lifeUniverseEverything;
var a = "asdf";
show(a.life_universe_everything);

Edoardo Batini's picture
Edoardo Batini
Wed, 2011-02-09 00:11

work in progress here: http://p2pu-js101.appspot.com/week2

Parag Shah's picture
Parag Shah
Wed, 2011-02-09 08:10

Creating an app is a wonderful way to submit answers :-) Especially like your button to run the Javascript code.

Edoardo Batini's picture
Edoardo Batini
Thu, 2011-02-10 00:43

ok, filled missing answers at http://p2pu-js101.appspot.com/week2

ps. thanks Parag ;)

Oscar Pagani's picture
Oscar Pagani
Wed, 2011-02-09 08:34

Hi Parag,

How does it work? the button to run the JavaScript code.

Thanks,

Oscar

Edoardo Batini's picture
Edoardo Batini
Wed, 2011-02-09 11:08

hi Oscar this is the html button code:

"<"button type="submit" onClick="assignments()">
Run iterateAndOperate
"<"/button>

(without "")

Whenever you are curious give a look to the page source (Ctrl-u on Firefox and Chrome).

ciao
edoardo

Oscar Pagani's picture
Oscar Pagani
Wed, 2011-02-09 13:06

I see what you did Eduardo.

Thank you

Oscar Pagani's picture
Oscar Pagani
Wed, 2011-02-09 13:08

Hi,

This is my blog and homework for week 2:

http://www.oscarpagani.com/p2pu/2011/02/08/javascript-101-week-2/

Thanks,

Oscar

JD's picture
JD
Thu, 2011-02-10 01:42

Only got through with a portion of week 2 assignment - I've update my blog post here. (Turning in assignment late, feels like highschool all over again, sheesh)
http://atlville.blogspot.com/2011/02/assignment-2.html

Nick Doyle's picture
Nick Doyle
Thu, 2011-02-10 18:19

My Week2 Assignments are posted here: http://js101blog.thecreativearmada.com/post/3217241421/javascript-101-as...

Also, mine comes a little late because I got really hung up on the iterateAndOperate functions in the last problem. I feel that this wasn't covered in great detail in any of Week 2's materials/readings or in Crockford's video and I'm not one to complain or think outside of the box and try things but I feel it was a bit advanced from Week 1's materials right into Week 2's yet there was no clear mention of this anywhere in the readings/materials except looking at other web sites and blogs. I speak for myself but also for the silent ones out there that may have struggled a bit on this one too! Just a thought, not so much a gripe as I did complete the assignment, barely ;)

Parag Shah's picture
Parag Shah
Thu, 2011-02-10 18:29

Hi Nick,

I am very glad you brought this up. I am looking forward to more feedback (in fact we will open a feedback survey mid-course).

Nick would it be possible for you to also specify which parts of the problem you felt were difficult and not covered in the video or reading material?

--
Regards
Parag

Seth Watson's picture
Seth Watson
Fri, 2011-02-11 07:18

My week 2 track 1 assignment is here http://sethwatson.wordpress.com/. I'm still working on the last homework question. Will update later today with that one. Thank you everyone for the awesome posts!

Rajarshi Bhattacharjee's picture
Rajarshi Bhattach...
Fri, 2011-02-11 13:51

Here is my week2 assignments and homework:
http://jscript101.blogspot.com/2011/02/week-2-assignments.html
Sorry for being late, got bogged down by college work.
Also, I had a query: is multiple inheritace allowed in Javascript? If so, how does it work?