Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-23-2005, 08:12 AM   PM User | #1
konst
New to the CF scene

 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
konst is an unknown quantity at this point
Structures like 'win95:"blabla",win98:"albalb"'

I've seen such a javascript constuction already not once, and I can't find any documentation on this feature.
The exact javascript code is e.g.:

var _q4W={win95:_XX("zlqgrzv#<83"),win98:_XX(" qvlw {(A@8"),winme:_XX("zlq<{#71<33"),win2000:_XX("{mrhs{w$rx$9244"),winxp:_XX("ykpfqyu\"pv\"7032"),winne t:_XX("xjoepxt!ou!6/31"),winnt:_XX("zlqgrzv#qw3"),linux:_XX("tqv}!8"),macosx:_XX("pdf#rv#{3"),macppc:_XX("rfh%>35")};

where _XX is a function defined earlier.
So the question is: is this any sense in such a constructions and (if yes ) how it should be used?
Should a javascript parser (which I'am developing) support such a syntax or it should generate errors (or maybe just ignore)?
Thank you for help
konst is offline   Reply With Quote
Old 03-23-2005, 09:05 AM   PM User | #2
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
http://www.byteshift.de/javascript-1...t.html#1009450
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Old 03-23-2005, 09:10 AM   PM User | #3
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
That is called object literal. Read these links to get more info on this.

http://javascriptkit.com/javatutors/oopjs.shtml
http://www.moztips.com/index.php

Edit:
jkd beat me to it.
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app

Last edited by glenngv; 03-23-2005 at 09:26 AM..
glenngv is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:02 AM.


Advertisement
Log in to turn off these ads.