0

I can't find in js how to find how many arguments where sent to the program (line in vb there is numberArg = WScript.Arguments.Count).

In addition I can't find a data structure like a map in js.

I searched the net and could n't find it.

Thanks

2
  • why is this tagged as a "java" question ?? Commented Aug 3, 2011 at 10:07
  • this was tagged to java script Commented Aug 3, 2011 at 12:02

2 Answers 2

1

in java script it is: WScript.Arguments.length.

Data structure like map is Object:

var map = new Object();
map["hello"] = "world";
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I couldn't find it in the net. Can u send me a link where u found it ? ot a good link to java script ?
1

Arguments.length is a size of array. Also look here for more cool stuff http://nilleb.wordpress.com/2008/08/27/javascript-code-to-use-wscript-parameters/

map is any object. E.g.

var mymap = {a:42, b:"hello world"}
alert(mymap.a)
alert(mymap['b'])

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.