javascript - 在hackerrank解决方案平台上用ECMAscript 6编写箭头函数程序时出现错误
问题描述
问题 - 编写一个程序,将输入作为 your_name 并返回 hello your_name
我的程序 -
Const.greet = (your_name) => {
返回('你好'+你的名字);
};
module.exports ={问候}
解决方案
检查此代码
const greet = (your_name) => {
return ('Hello' + your_name);
};
console.log(greet('ab'))
推荐阅读
- c# - 将所有泛型参数约束到单个接口 c#
- r - 如何将每第 n 行复制到整个数据集
- visual-studio - 将 WinDbg 插件移植到 Visual Studio 2019 扩展
- swift - 如何在守卫中使用 UISegmentedControl 和文本字段
- ios - Xcode11 命令 PhaseScriptExecution 因 SDWebImage 的非零退出代码而失败
- java - 如何将字符串数组调用到方法中
- yaml - 将 OAS 3.0 中的“oneOf”用于“必需”属性的多个标准
- java - 如何将 ObservableList 转换为 ObservableSet
- python - 从每一行制作 CSV 文件
- angular - 验证angular4中的多个复选框