Fun with Javascript


  • Objects – documents, html tags, images, strings, functions, console – everything!
  • An object is just a special kind of data, with properties and methods.
  • Properties – values associated with an object – color, length, substring
  • Methods – (functions) – VERBS – write, confirm, alert, prompt, log
  • Events – tell Javascript when to execute the code – onclick, onlaod, onmouseover


  • Javascript is written in dot syntax (sometimes called dot notation).
  • A dot separates the objects, properties and methods within a statement. Here console is the object and log is a method; document is the object and write is the method; document is the object, getElementById is a method and innerHTML is a property:
    • console.log(“Javascript is not so hard!”);
    • document.write(“Boo! You are NOT the only sentence!”);
    • document.getElementById(“demo”).innerHTML = “Hello Dolly”;
  • You can use the Javascript Console in Chrome to test out javascript statements! Go to VIEW-DEVELOPER-JAVASCRIPT CONSOLE


W3Schools is an excellent introductory Javascript resource, with lots of examples and a complete reference

A series of pretty good beginner’s exercises:


This blog is for exploring new models of journalism using technology and community participation.

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: