javascript - javascript 命令行参数和映射

标签 javascript command-line dictionary

我在js中找不到如何查找发送到程序的参数数量(vb中的行有numberArg = WScript.Arguments.Count)。

另外我在js中找不到像map这样的数据结构。

网上搜了没找到。

谢谢

最佳答案

在java脚本中它是:WScript.Arguments.length

像 map 这样的数据结构是对象:

var map = new Object();
map["hello"] = "world";

关于javascript - javascript 命令行参数和映射,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6924711/

相关文章:

javascript - 给h1的最后两个字母涂其他颜色

java - 有没有办法在Java中使用KeyListener在命令行应用程序中使用?

node.js:使用用户输入作为命令行参数是否安全?

python - 值错误 : Feature not in features dictionary

javascript - 使用 Javascript 保存跟踪的 GPS 数据

javascript - 通过选择不同的选项来改变 margin

c - Linux/C : Writing command-line arguments to a text file as separate lines?

python - 如何去掉 Choropleth 的白色背景?

java - java中的foreach循环用于字典

javascript - 如何使用post方法(AJAX)调用异常?