₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,424 members, 8,426,460 topics. Date: Sunday, 14 June 2026 at 10:12 AM

Toggle theme

Js Test - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersJs Test (637 Views)

1 Reply (Go Down)

Js Test by Nobody: 10:42pm On Dec 01, 2011
Actually i'm bored so i decided to inflict some pain on some people if i can. angry



var test={
x:24,
getX:function(){
return this.x
}


}

var remi=test.getX;
remi(); //undefined

The Following Code creates a literal Object called test with a property x which is assigned 24 and a getX property which is a function and returns x in test however copying test.getX to remi copies the function from the object to a variables and outputs undefined

so the goal is to:

(a). Explain why it is undefined ?
(b). What method can bind the context of the remi function to that of test ?

share my boredom grin
Re: Js Test by Nobody: 10:43pm On Dec 01, 2011
oh i forgot DHTML is not allowed to participate ? tongue
Re: Js Test by Nobody: 10:47pm On Dec 01, 2011
pc guru:
oh i forgot DHTML is not allowed to participate ? tongue
Almost clicked. . . .takes it back (swallowed the post painfully)
Re: Js Test by Nobody:
Re: Js Test by Nobody: 5:41am On Dec 02, 2011
correct. and yes i just woke up after getting an alert to say "correct" back to sleep. tongue
Re: Js Test by Nobody: 8:31am On Dec 02, 2011
You forgot to ban omo_to_dun as well - he may not know jscript, but he is an expert programmer
Re: Js Test by Nobody: 4:24pm On Dec 02, 2011
dhtml is right omo dun is a python coder,who else wud ave functional
programming skills than those "snakes" pythons cheesy . will put another just want new JS peeps to learn basic stuff to make JS frameworks easier to grasp.
1 Reply

After Upgrade To Wordpress 4.0 I Am Getting A JS ErrorI Need Advanced PHP Programming,ajax And JS Ebooks, Pls!!!Js Innerhtml Not Working234

What Is The Best Website On ForexWhat Does A Hacking Attack Mean To Consumers?Cheap Insurance Quotes