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

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;

var a = "asdf";

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

work in progress here:

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

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.



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

(without "")

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


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


This is my blog and homework for week 2:



JD's picture
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)

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

My Week2 Assignments are posted here:

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?


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

My week 2 track 1 assignment is here 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:
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?