Closed Thread Icon

Topic awaiting preservation: const and weird XHTMLNS js variables? Pages that link to <a href="https://ozoneasylum.com/backlink?for=8922" title="Pages that link to Topic awaiting preservation: const and weird XHTMLNS js variables?" rel="nofollow" >Topic awaiting preservation: const and weird XHTMLNS js variables?\

 
Author Thread
smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 10-25-2003 01:44

Hi,

This is just a request for some clarification as I'm having trouble with google.

Basically what is 'const' and how does it differ from 'var'?

Also I notice that lots of scripts lately are including XHTMLNS doctype type things:
http://www.kryogenix.org/code/browser/nicetitle - see the js file and look for the lines below:

var XHTMLNS = "http://www.w3.org/1999/xhtml";

var d = document.createElementNS(XHTMLNS,"div");

pat = document.createElementNS(XHTMLNS,"p");

pad = document.createElementNS(XHTMLNS,"p")

What is this for?

Thanks,

Jon

visit my CryoKinesis Online Gallery

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 10-25-2003 01:50

The difference between 'var' and 'const' is that a 'const' is a constant variable meaning that you can't change its value once it is created. While the 'var' is a variable variable so you can change its value whenever you feel like it.

Never heard of the XHTMLNS thing before.

_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"
- the Golden Ratio -

« BackwardsOnwards »

Show Forum Drop Down Menu