radash工具函数示例代码

代码语言:html

所属分类:其他

代码描述:radash工具函数示例代码

代码标签: radash 工具 函数 示例 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
    <title>BFW NEW PAGE</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/radash.min.js"></script>
    <script type="module">


const gods = [{
  name: 'Ra',
  power: 'sun',
  rank: 100,
  culture: 'egypt'
}, {
  name: 'Loki',
  power: 'tricks',
  rank: 72,
  culture: 'norse'
}, {
  name: 'Zeus',
  power: 'lightning',
  rank: 96,
  culture: 'greek'
}]

console.log(radash.max(gods, g => g.rank)) // => ra
console.log(radash.sum(gods, g => g.rank)) // => 268
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0