dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: onefootswill

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    5,846

    Scope and Nested Functions

    I'm having trouble getting my head around one of those notorious Javascript foibles to do with scope. Scope and nested functions.
    Looking at the following plunk, I have two javascript objects,...
  2. Replies
    19
    Views
    2,737

    You guys totally rock! There has been some great...

    You guys totally rock! There has been some great explanations in there.

    I think I have, once again, mixed up prototypal inheritance with pseudoclassical. Not in concept; but in implementation.
    ...
  3. Replies
    19
    Views
    2,737

    Prototypal Inheritance

    Hi Guys,

    I'm struggling to get my head around prototypal inheritance. The example that I have been tinkering with is:


    <html>
    <head>
    <title></title>

    <script...
  4. Replies
    7
    Views
    1,666

    Ah. Right. Thanks. That definitely helps to fill...

    Ah. Right. Thanks. That definitely helps to fill in the picture for me.

    So you can only use prototype if you use a function constructor to create the object.

    As Crockford's method uses a...
  5. Replies
    7
    Views
    1,666

    Hi guys. Thanks very much. Jeff. I was on the...

    Hi guys. Thanks very much.

    Jeff. I was on the right track with your suggestions. Previously I had the following code:


    // "person" written as a plain object
    var person...
  6. Replies
    7
    Views
    1,666

    Hi Coldfire, Thanks for that. However, I did...

    Hi Coldfire,

    Thanks for that. However, I did not want to use the new operator when creating a Person object. I wanted to use Douglas Crockford's function:


    object.create =...
  7. Replies
    7
    Views
    1,666

    prototype augmenting problem

    Hi There,

    I am struggling forward trying to understand some of the fundamentals of the language. I am getting an error with the following simple code:


    <script type="text/javascript">...
  8. Replies
    2
    Views
    813

    Thanks rnd me. Bit of a trick question. Window...

    Thanks rnd me.

    Bit of a trick question. Window is the answer, which is neither Global or the object o. Although I think I read somewhere that window is the Global object where the host is a web...
  9. Replies
    2
    Views
    813

    Scope Quest

    Hi,
    I have a question about the following example from the book I am reading:


    I have deduced from Firebug the the answer is global object. But I do not understand why.
    Here is what I think....
  10. Replies
    4
    Views
    1,245

    Awesome. Thanks very much!

    Awesome. Thanks very much!
  11. Replies
    4
    Views
    1,245

    Thanks KOR. I think I understand the 2nd one...

    Thanks KOR.

    I think I understand the 2nd one now i.e. var v = v || 10;

    What you effectively have is var v = undefined || 10 as v has not been assigned a value at all yet.

    And undefined || 10...
  12. Replies
    4
    Views
    1,245

    Conversion Questions

    I have a few conversion/cast questions. From a book I am reading:
    At the console (firebug), why do the following give the results below

    !!"false" results in true;
    var v = v || 10; results in...
  13. Replies
    5
    Views
    1,703

    Cool thanks. I'll check it out tonight!

    Cool thanks. I'll check it out tonight!
  14. Replies
    5
    Views
    1,703

    Thanks Guys. I'm more curious about how to do the...

    Thanks Guys. I'm more curious about how to do the equivalent using the prototype notation.

    I moved the prototype statement outside of the constructor, but it complained about the this references.
  15. Replies
    5
    Views
    1,703

    OO Javascript

    Hi,

    I'm learning how to write OO Javascript and cannot figure out what is going on with an error that I am getting.
    I have a js file (objects.js) with a Person object and a student inheriting...
  16. Replies
    2
    Views
    539

    Thanks very much. That did the trick!

    Thanks very much. That did the trick!
  17. Replies
    2
    Views
    539

    noob having problems

    Hi - I'm a javascript noob.

    I have written the following small page and cannot figure out why it will not work. (It is meant to validate against empty input).


    <!DOCTYPE html PUBLIC...
Results 1 to 17 of 17
HTML5 Development Center



Recent Articles