javascript - how to make a program declare variables depending on the number of inputs
问题描述
I work on a program in which it processes information into an object describing the input. In other words it creates an object for each input However the number of inputs is not defined so how can make the program declare variables depending on the number of inputs and use them later in the process (for exemple comparing a certain trait or sorting)
PS : I tried using arrays but It got so nested(3 levels of nesting which is hell absolutely hell especially that I am still a novice ) and so complicated and hard to debug SO I WOULD APPRECIATE A BETTER WAY TO SOLVE IT
解决方案
推荐阅读
- adobe-analytics - Adobe DTM 将 Unix 时间戳传递给 eVar
- mysql - 总结 MYSQL 中的列 + 数据
- scala - 具有 2 个功能的 CallByName
- javascript - 为什么我尝试向用户显示警报会引发错误?
- python - 如何在pygame中使用操纵杆使精灵向上和向下移动
- java - 如何同步线程的结果 - Java 11
- python - 如何检查列表中的任何单词是否在列中的每一行中
- python - 如何修改此代码以打印等效项?
- backbone.js - 升级到主干 1.3.3 后主干模型属性嵌套两次
- python - 如何用字典保存类的对象以进行设置