Skip to content

Tag Archives: Javascript

Modern JavaScript Development: Scope

23-Sep-08

After hearing an interview Scott Hanselman did with Scott Cate about JavaScript a while ago, I decided to use one of my presentations into a screen cast. In this two-part screen cast, I cover how scope works in JavaScript and how we can use object literal notation to fake namespaces.
Making JavaScript Less Painful part 1
Making [...]

Modern Javascript Development: constructors and objects

26-Feb-08

JavaScript doesn't have a "class" keyword or any formal class construct. Instead, functions are 1st class objects. When you write a function, you are essentially writing a constructor for a new object.
Here we are defining a object constructor called "newClass" and assigning some member values.
PLAIN TEXT
CODE:

function newClass() {

    this.name = "newClass";

    [...]