Jump to content

Questions about JavaScript libraries


aspnetguy

Recommended Posts

I've been looking at some libraries lately (mainly dojo) and have a few questions I hope someone can answer.Firstly what does this mean?

var dojo = {};

I have seen var arr = []; used to define an array but not {}.Also I can't seem to understand what this is doing or what it means

dojo.version = {	// summary: version number of this instance of dojo.	major: 0, minor: 4, patch: 0, flag: "",	revision: Number("$Rev: 6258 $".match(/[0-9]+/)[0]),	toString: function(){		with(dojo.version){			return major + "." + minor + "." + patch + flag + " (" + revision + ")";	// String		}	}}

What is with the major: 0, minor: 0, etc and again there is the dojo.version = {...}, I assume the variable: value and {} are related but am not sure how.thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...