Added: 3 years ago
From: thenewboston
Views: 44,432
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (64)

Sign In or Sign Up now to post a comment!
  • You're awesome!!! :D

  • @ 3.53 its not embarrassing dude...we all learn from our mistake....its a lesson for all of us too ^_^ keep rocking!!!

  • Keep up the great work....

  • Gim3 T8mbs \./p 7o\./ n00bs. G3t A 1ife y0r n0t 1337.

    Reply if you can read this!

  • Hey now brown cow!

  • superb fogtalk99%

  • hahah nice video

  • @314rce shutup kid I was just telling him how I do it

  • Because I do Java I write my stuff as:

    function bob(){

    blahblah

    }

  • @xxcky1

    A function is about the same as a method in Java. So what's the big deal about what you wrote? You moved the { up one line??? Oooooooo man that's impressive.

  • @314rce Shutup kid

  • @xxcky1 Excellent comeback. Very well-crafted.

  • @314rce You're a complete idiot

  • @xxcky1 I do the same thing.

  • what program are you using for javascript?

  • @izandjukicBRE notepad++ :) hope i helped

  • How to spam your friends, no virus, just for fun :P

    Type this in the browser website bar (without the enters):

    javascript:function cake(){alert("GOTHA N000000000000B"); cartman();} function cartman(){alert("Seriously, you SUCK!"); cake();} cake();

    Note that this nearly only work on windows internet explorer or any firefox version later than 4.01

  • tnx bro

  • please upload videos for svgs and write and read a file using java script

  • thank dude, I wish you also have a assembly language tutorial.

  • I love these tutorials!!!

    

  • 2 people are brown cows

  • Thanks. Learned Python, a little PHP (will go learn more), some CSS (wish you would make more), and now learning Javascript! Great teacher!

  • you are a very good teacher and i really enjoy learning from your videos but can you please STOP using alert boxes for examples and do other examples than that. thanks

  • @chathamfatboy12

    alert("He does it as a way to visually show what the code is doing and to make debugging easy");

    you could also use it to write a trace function for examining your code later on.

  • lol u wrote say and got embarressed?!?!?!?!? OMG I MISSPELL SO MUCH ITS SAD!!!! dont u guys?

  • the synt. for function is ....... function ^^ hahaha

  • WOOHOO!!!!1 NUMBER 11TH VIDEO, AND I STILL HAVEN'T LEARNED ANYTHING COOL. BUT YOU KNOW WHAT, I HAVE LEARNED SO THANK YOU VERY MUCH!!! : )

  • you can name it asdfjkl if you wanted to :D

  • your toturials are great, thank you so much!

  • Is there a difference between...

    var sayhi="how now brown cow";

    alert(sayhi);

    alert("are you still watching this?");

    alert(sayhi);

    and what you / he did?

  • @MrCritic17

    There would be no differences if what you want to do is that simple.

    Using function would make a difference if you want to do something more complex.

    Like:

    function sayhi(){

    var name = promt("what is your name?");

    document.write("Hi " + name + "!");

    }

    sayhi(); sayhi();

    function is used for something that is not as simple as the example. This example is just to give you some understanding about how to use and how to construct a function.

  • Comment removed

  • @TheCTCentury

    A more extreme example:

    function hello(x){

    for(i=0;i<x;i++){

    document.write("There are deep lacerations where ALIENS HAVE TAKEN OVER HIS BWODY! HU-WHAAAAAT!?")

    }

    }

    hello(9001)

    it's over 9000

  • @MrCritic17 No there isn't. But when you start coding and have longer functions other than just one alert then they come in handy.

  • @MrCritic17 It would do the same job...Every language works the same. They execute the code line by line, depending if it is in a function or not. When your browser open a page the javascript is not executed on the load automaticly IF it is in a function, else if your javascript is not in a function it will be executed on the load of your page. Functions need to be called and in this tutorial he actually call the function on the load but usually we call function on an evenement

  • embarrassing, you last spelt false as flase.

  • This:

    ()

    is not two empty parameters lol...... :P

  • this function script will save 2 things, time and memory for the computer, thanks

  • How do you view your javascript? I notice you hit save, then refresh that page, and it appears but how did you make it appear there?

  • @drkmaster0 He's saving it to an .html file that he already has loaded into his browser. After he saves the file, he just refreshes the page to reload the code.

  • THANKS!!!!

  • Alerty :) hehe, nice video tutorials!

  • thats a great tutorial, very clear and precise. Your mistake actually really works in explaining how to call a function! :)

  • so... in other words...

    a function acts like a variable for a bunch of code?

  • @JustaFreak15 Yes...pretty much. :)

  • if (commandhere)

    {

    //scriptsgohere

    }

  • i dont get how you can code like this:

    if( blabla)

    {

    code

    }

    i find it way easier to code like so:

    if(blabla){ code;

    }

    anyways good tuts, keep it up.

  • because its the right way to lay your code out

  • Comment removed

  • @flash4real lol, the first look much better (with adding 4 spaces to indent the code) IMO.

  • tab :)

  • dude how do you do the indentation in notepad++?

  • Dude you are awesome! :D I have learned so much from you its just great, you could seriously teach a class man. Keep up the great work!

  • you can't have a semicolon after something like

    function one()

    right?

  • prety much the same as varibles then, right?

  • nope

  • no you use functions for holding javascript code, you use variables for a value

  • do you have to end a function call with a semicolon?

  • The semicolon isn't really needed but it's good programming practice to use it when it's called for.

  • Nice vids man but iv got one question=)

    Do i have to make every different (not the same) function again for making mouse over button menu with javascript,

    or there is a little bit easier way

    If i have to

  • idk

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more