官术网_书友最值得收藏!

Node Fundamentals – Part 2

In this chapter, we'll continue our discussion on some more node fundamentals. We'll explore yargs, and we'll see how to parse command-line arguments using process.argv and yargs. After that, we'll explore JSON. JSON is nothing more than a string that looks kind of like a JavaScript object, with the notable differences being that it uses double quotes instead of single quotes and all of your property names—like name and age, in this case—require quotes around them. We'll look into how to convert an object into a string, then define that string, use it, and convert it back to an object.

After we've done that, we'll fill out the addNote function. Finally, we'll look into refactor, moving the functionality into individual functions and testing the functionality.

More specifically, we'll go through following topics:

  • yargs
  • JSON
  • Adding note
  • Refactor
主站蜘蛛池模板: 五寨县| 金川县| 巫山县| 南雄市| 教育| 类乌齐县| 焦作市| 邵阳县| 牙克石市| 秦安县| 石城县| 牡丹江市| 乡宁县| 彭州市| 冀州市| 禹州市| 贡山| 枣庄市| 迁安市| 彩票| 永德县| 瓦房店市| 独山县| 平和县| 儋州市| 浑源县| 朔州市| 朝阳市| 福州市| 南漳县| 临桂县| 南充市| 周至县| 都兰县| 乳山市| 庆云县| 宣汉县| 启东市| 兰考县| 烟台市| 扬中市|