当前位置:网站首页>Filter the numbers and pick out even numbers from several numbers
Filter the numbers and pick out even numbers from several numbers
2022-07-05 06:17:00 【hamimelon2020】
<template>
<div>
<li v-for="n in evenNumbers" :key="n">{
{
n }}</li>
</div>
</template>
<script>
export default {
name: 'item',
data() {
return {
numbers: [ 1, 2, 3, 4, 5 ]
}
},
computed: {
evenNumbers() {
return this.numbers.filter(number => number % 2 === 0)
}
}
}
</script>
边栏推荐
- A reason that is easy to be ignored when the printer is offline
- Appium自动化测试基础 — Appium测试环境搭建总结
- 【Rust 笔记】16-输入与输出(上)
- leetcode-6111:螺旋矩阵 IV
- [rust notes] 13 iterator (Part 2)
- [leetcode] day95 effective Sudoku & matrix zeroing
- 【LeetCode】Day95-有效的数独&矩阵置零
- Arduino 控制的 RGB LED 无限镜
- Leetcode-1200: minimum absolute difference
- 1039 Course List for Student
猜你喜欢
快速使用Amazon MemoryDB并构建你专属的Redis内存数据库
Doing SQL performance optimization is really eye-catching
Traditional databases are gradually "difficult to adapt", and cloud native databases stand out
NotImplementedError: Cannot convert a symbolic Tensor (yolo_boxes_0/meshgrid/Size_1:0) to a numpy ar
1.13 - RISC/CISC
Data visualization chart summary (I)
SQL三种连接:内连接、外连接、交叉连接
redis发布订阅命令行实现
Leetcode-6111: spiral matrix IV
开源存储这么香,为何我们还要坚持自研?
随机推荐
MySQL advanced part 2: optimizing SQL steps
11-gorm-v2-03-basic query
Records of some tools 2022
How to understand the definition of sequence limit?
开源存储这么香,为何我们还要坚持自研?
Leetcode-22: bracket generation
Collection: programming related websites and books
Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
LeetCode 0108.将有序数组转换为二叉搜索树 - 数组中值为根,中值左右分别为左右子树
Leetcode stack related
MySQL advanced part 2: storage engine
MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理
Open source storage is so popular, why do we insist on self-development?
【LeetCode】Easy | 20. Valid parentheses
SPI details
【Rust 笔记】17-并发(上)
Record the process of configuring nccl and horovod in these two days (original)
QT判断界面当前点击的按钮和当前鼠标坐标
Quickly use Amazon memorydb and build your own redis memory database
[rust notes] 13 iterator (Part 2)