1 Star 0 Fork 84

周儒浩/前端77

forked from 万少/前端77 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
14-map和箭头函数结合.html 670 Bytes
一键复制 编辑 原始数据 按行查看 历史
万少 提交于 2022-05-13 16:05 . map和箭头函数相结合
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no"
/>
<title>14-map和箭头函数结合.html</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
</style>
</head>
<body>
<script>
const arr = ['a', 'b', 'c'];
const newArr = arr.map((value) => `<li>${value}</li>`);
const newArr2 = arr.map(function (value) {
return `<li>${value}</li>`;
});
console.log(newArr);
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhou-ruhao77/front-end-77.git
git@gitee.com:zhou-ruhao77/front-end-77.git
zhou-ruhao77
front-end-77
前端77
js高级第1天

搜索帮助