Activate your free membership today | Log-in

Thursday, November 29th, 2007

Ajaxian Featured Tutorial: JavaScript Basics

Category: JavaScript, Tutorial

<p>I have to say that at one point, I truly thought that JavaScript was using some type of “black magic”. Things such as closures really threw me for a loop and I was fortunate to have some good folks to walk me through some of the tougher concepts. Not everyone is as lucky and thankfully, we have developers like Christian Heilmann who continue to put out great postings that cover a broad range of topics and experience levels.

In his latest posting, Christian outlines certain JavaScript shortcut notations which make understanding specific JS techniques a whole lot easier. For example, when dealing with objects, there’s the involved way of defining objects:


var links = new Object();
links['Cute Overload'] = ‘http://cuteoverload.com’;
links['I can has cheeseburger'] = ‘http://icanhascheezburger.com’;
links['Pencils at dawn'] = ‘http://pencilsatdawn.wordpress.com’;
links['Hobotopia'] = ‘http://apelad.blogspot.com’;

and then there’s the easier way using object literals:

var links = {
‘Cute Overload’ : ‘http://cuteoverload.com’,
‘I can has cheeseburger’ : ‘http://icanhascheezburger.com’,
‘Pencils at dawn’ : ‘http://pencilsatdawn.wordpress.com’,
‘Hobotopia’ : ‘http://apelad.blogspot.com’ // < -- again, no comma!
}

Christian provides plenty of great examples that should substantially help new JavaScript developers.

Related Content:

  • Ajax Learning Guide
    Chances are, you've been doing JavaScript and XML developer work in Lotus Domino for quite some time. This old/new approach is causing quite a stir in...
  • Ajax Tutorial
    Ajax, short for Asynchronous Java and XML, has allowed developers to create interactive Web pages with rich interfaces. Rich Internet applications...
  • JavaScript Learning Guide
    This SearchDomino.com guide introduces you to JavaScript in a Notes/Domino environment, explains best practices and pitfalls to avoid and provides...
  • JavaScript IntelliSense: Visual Studio 2008 Learning Guide
    This section of the Visual Studio 2008 Learning Guide examines JavaScript IntelliSense, which aims to make life easier for ASP.NET AJAX...
  • Silverlight Learning Guide: Working with JavaScript
    This section of the Silverlight Learning Guide covers the basics of working with JavaScript, a key programming language for Silverlight...

Posted by Rey Bango at 6:30 am
2 Comments

++---
2.6 rating from 40 votes

2 Comments »

Comments feed TrackBack URI

Nothing new for us, good for beginners.

Comment by bollysite — November 30, 2007

@bollysite: Yes, that was the point. We post tutorials that focus on all experience levels, not just the folks that are savvy.

Comment by Rey Bango — November 30, 2007

Leave a comment

You must be logged in to post a comment.