【发布时间】:2020-06-08 18:28:43
【问题描述】:
在 javascript 中使用箭头函数时,尝试让控制台日志显示名字和姓氏的首字母。
const getInitials = (firstName, lastName) => {
firstName + lastName;
}
console.log(getInitials("Charlie", "Brown"));
【问题讨论】:
-
这能回答你的问题吗? How to get first character of string?
标签: javascript