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

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
主站蜘蛛池模板: 泸溪县| 佛学| 东至县| 东方市| 越西县| 盈江县| 江安县| 西丰县| 故城县| 博客| 玛多县| 凭祥市| 即墨市| 潞城市| 晴隆县| 内黄县| 和龙市| 凉城县| 榆中县| 凤阳县| 马龙县| 洛浦县| 布尔津县| 易门县| 合水县| 平邑县| 巩留县| 双城市| 崇仁县| 西吉县| 南阳市| 阳东县| 洛南县| 怀安县| 呼玛县| 济阳县| 遂昌县| 同江市| 宣恩县| 曲靖市| 南涧|