JavaScript Video Tutorial Pt 4

Best JavaScript Book :

JavaScript Arrays & Functions : Manipulate Array Data : Use Multi-Dimensional Arrays : The For In Loop : Do Awesome Things with the Argument Object : Much More

Code is Here:






24 responses to “JavaScript Video Tutorial Pt 4”

  1. Shaun Pritchard Avatar

    Hey have been watching your vids great job by the way I was useing the "add these" function and added an input so I could put my own value in and am getting an error im trying to put the value from text input into a variable then pass it to the function exactly as you wrote it? but no dice I am also tring to keep all the document.writes on the screen the disappear though any thoughts??

    <input name="buttonExecute" onclick="execute(document.getElementById('txt1').value)" type="button" value="Execute" /> <br />

    var input1 = document.getElementById('txt1').value
    document.write("1 + 2 =" + addThese(1,+ input1) +"<br />");

  2. magicram Avatar

    Derek, this is a beautiful and very useful tutorial! Compliments!
    I think i found an error 😀

    In the addMany function, you declared:
    var i = 1;
    var sum = 1;
    and the result of the call addMany(1,1,1,1,1,2) is 7 only because the arguments[0] is 1. In fact, if you modify the call in addMany(100,1,1,1,1,2) the result doesn't change!
    At the first cycle of the while you have:

    sum = sum (=1) + arguments[1] (=1)

    You have to do something like this:

    var i = 0;
    var sum = 0;

    and then it'll work correctly!

    I hope i was helpful to you!
    Thank you so much again, for your wonderful tutorials!

  3. holyghostx Avatar

    "Funky things you can do with functions"

  4. Scereye Avatar

    In scopey() you can also use "this.scopeTest" for Scopey 1st, to refer to the global variable. Probably the easiest way to distinguish between the two while keeping variablenames the same.

  5. Ivan Bogatec Avatar

    You can also define: addMany() (i.e. without arguments) and still works the same way as addMany(a,b,c,d,e,f).

  6. adobezgaca Avatar

    but let's say that you want to use the global variable in your function, how would you go about doing that ?

  7. Odell Ping Avatar

    What would you recommend as a text editor to do javascript?

  8. Brahmaiah Nani Avatar

    Derek Banas

    javascript now i can understanding very clearly better than before thanks .
    Can you provide Anular.js ?

  9. joe choi Avatar

    16:10 kinda outside the point but I noticed that in your tutorials you return true sometimes. Is there a reason for that?

  10. MrReynevan2 Avatar

    So then, how does function(p,a,c,k,e,d) actually work?

  11. MrReynevan2 Avatar

    Is there something like C#'s List<T> in JavaScript?

  12. katrina cusi Avatar

    as the first year student it's quite to hard for me to understand this part four of your tutorial but I really really love and like the head aches that I have right now

  13. miguel lara Avatar

    Wow! Coming from such a strict language such as C# in a LOB applications development environment, it amazes me how much freedom javascript gives you out of the box, really loosely typed indeed.. Although I can see it turning against you really easy if you are not careful. Really enjoying your tutorials, I just watched your OOP w/JS… Madness :-/ . Liked and subbed…. Keep them coming. Tks.

  14. Sushim Dutta Avatar

    I have followed most of your tutorials for Java data structures. Having learned that, I had finally landed in my dream job role.Just wanted to thank you for the same. Also, I am learning JS from your playlist, could you help me with the IDE that you use for JS?

  15. Shiinon Dogewalker Avatar

    The add many does not really work:
    It stats at i = 1 and sum = 1, causing it to ignore the 0th element and act as if it is 1 every time. In the video it works, because 1 is passed as the 0th value every time.
    But if you call for example addMany(5, 1); you get 2.
    Set sum = 0 and i = 0 to fix.

  16. Matt Dathew Avatar

    its quite surprising how much script varies fr others

  17. Anuj Singh Avatar

    it's really helpful.thanks a lot Derek Banas!!!

  18. Nicolas Rivers Avatar

    Hey Derek, Great tutorial. I usually have no trouble following your vids if I rewind enough times when I get an information overdose. But I cannot understand how in 12:25 the i variable became a part of the argument array, and how that allows the code to loop through every argument. It is probably very simple but I can't wrap my head around it. Would you explain it for me?

  19. Michael Marden Avatar

    I am trying to find a good quick reference to look up other default properties for a function, such as "arguments.length" property.
    BTW, great job.  very helpful.  Thx

  20. Jay White Avatar

    Good crash courses.

  21. Marc Stephen Avatar

    Cool tutorials. Love me that iMovie template!

  22. Mossy494 Avatar

    How do you use global variables then if they become undefined in functions? As in how can you modify them inside functions?  You must pass them in the args?

  23. rywilsonmusic Avatar

    funky things with functions? funky functions!

Leave a Reply

Your email address will not be published. Required fields are marked *