惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
T
Threatpost
博客园 - 司徒正美
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 聂微东
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
SecWiki News
SecWiki News
aimingoo的专栏
aimingoo的专栏
博客园_首页
小众软件
小众软件
Security Latest
Security Latest
M
MIT News - Artificial intelligence
腾讯CDC
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
S
Securelist
博客园 - 叶小钗
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
Arctic Wolf
Google Online Security Blog
Google Online Security Blog
I
Intezer
Hacker News: Ask HN
Hacker News: Ask HN
N
News and Events Feed by Topic
Recent Commits to openclaw:main
Recent Commits to openclaw:main
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
AI
AI
G
Google Developers Blog
T
Tor Project blog
J
Java Code Geeks
H
Help Net Security
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Check Point Blog
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
TaoSecurity Blog
TaoSecurity Blog
P
Palo Alto Networks Blog
F
Fortinet All Blogs

博客园 - 春风得意之时

gif动态图制作 2025年起,cnpm使用淘宝镜像 el-table合并相同数据的行 el-upload file转blob 用于预览pdf.js和下载文件 area.js CSS 实现防止按钮重复点击 JS高级用法-清空数组 能找到相同 id 属性值的数据则进入判断--JS JS slice(0);克隆数组 控制一行显示多少个Item Uview里面公用的css类 如何形象地解释 JavaScript 中 map、foreach、reduce 间的区别? 通过bat启动jar的命令 ES6语法解决现在笔记本屏幕设置为125% 150%导致页面缩放的问题 在线版冰墩墩 nginx带有Java(前后分离)和PHP环境的配置 maven打包命令 js reduce函数基本知识和应用 iframe里面获取父级页面URL参数
JS map 三种不同的写法返回值
春风得意之时 · 2022-10-13 · via 博客园 - 春风得意之时
function createData() {
  // 如果不 fill 循环默认会跳过空值
  return new Array(1000).fill(null).map((v, i) =>
    ({ name: `name${i + 1}` })
  );
}

function Cra(){
  return new Array(1000).fill(null).map((v,i)=>{
   return {name:`name${i+1}`}
  })
}

function mapreturn(){
  return new Array(1000).fill(null).map((v,i) => (
    {name:`name${i+1}`}
  )
)
}

// console.log(mapreturn());
//
// const data = createData();
// console.log(data);

console.log(Cra());