val data = arrayOf("one", null, "three", "four", null) // 将非空字符串转换为其长度, 非空字符串长度: [3, 5, 4] data.mapNotNull { it?.count() }.forEach { _console.log(it) }