I am trying to write a simple method to add to my object constructor. All the standard property's work fine but I cant get the method to return anything.
I am not sure if it needs to be a prototype since its inside a constructor.
Thanks for your help!
I am running "console.log(HR.Info);"...
Ok thanks for your help I get it now. For some reason I believed firebug was able to run standalone .js
Thanks for clearing it up for me.
Also just to answer your question vacunita, I was referencing a js file on my desktop with the firefox browser.
The code works fine for me when I put it in script tags and save it as html, but when I try it as a .js file it returns undefined. Are you saving it as .html with script tags or running it as is?
that exact code saved as a .js file returns undefined in the latest version of firefox and firebug.
Feherke, did you save it as a html file or js file?
I tried putting script tags around the js and saved it as html and retried it in firebug and it worked.
Do most of you experience firebug users add script tags around your JS and save it as html before testing?
Hey guys I am new to debugging JavaScript in firebug and am trying to do something pretty basic and getting frustrated.
here is my code that I am loading in firebug
//Code Starts
function Person(first,last,age){
this.firstname = first;
this.lastname = last;
this.age = age;
var bankBalance =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.