nodeschool learnyounode node.js module FILTER LS exercise

后端 未结 8 1628
耶瑟儿~
耶瑟儿~ 2021-02-10 05:46

Below is the exercise 5 of nodeschool learnyounode module

Create a program that prints a list of files in a given directory, filtered by he extension of the files. You w

8条回答
  •  时光说笑
    2021-02-10 06:29

    The only thing missing in your code is the concatenation of '.' before the file extension type.

    var extension = '.'+ process.argv[3];

    You can then do the comparison and printing.

提交回复
热议问题