Parameter naming: filename or fileName?

前端 未结 9 2021
情歌与酒
情歌与酒 2020-12-29 19:26

I try to be grammatically correct in my naming*. I\'ve always used filename instead of fileName. The java convention also seems to use this, but

9条回答
  •  执念已碎
    2020-12-29 19:46

    Filename ~ an identifying name given to an electronically stored computer file, conforming to limitations imposed by the operating system, as in length or restricted choice of characters.

    In the past this was considered two words but now is defined as one word so

    var filename = ......

    if it was two words it would be

    var fileName = ....

提交回复
热议问题