Declaring a return type explicitly for a function improves code readability, since the type of data that the function will return is immediately clear.

  • 显式地声明函数的返回类型可提高代码的可读性,因为函数返回的数据的类型一目了然。
目录 查词历史