当前位置:网站首页>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>
边栏推荐
- [leetcode] day95 effective Sudoku & matrix zeroing
- Leetcode-22: bracket generation
- Usage scenarios of golang context
- 【LeetCode】Day94-重塑矩阵
- Records of some tools 2022
- Traditional databases are gradually "difficult to adapt", and cloud native databases stand out
- 【Rust 笔记】17-并发(上)
- LeetCode 1200. Minimum absolute difference
- 传统数据库逐渐“难适应”,云原生数据库脱颖而出
- Error ora-28547 or ora-03135 when Navicat connects to Oracle Database
猜你喜欢

Real time clock (RTC)

Data visualization chart summary (I)

Appium foundation - use the first demo of appium

Matrixdb V4.5.0 was launched with a new mars2 storage engine!

数据可视化图表总结(一)

Appium自动化测试基础 — Appium测试环境搭建总结

wordpress切换页面,域名变回了IP地址

MySQL怎么运行的系列(八)14张图说明白MySQL事务原子性和undo日志原理

Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition

Appium基础 — 使用Appium的第一个Demo
随机推荐
MIT-6874-Deep Learning in the Life Sciences Week 7
Operator priority, one catch, no doubt
Matrixdb V4.5.0 was launched with a new mars2 storage engine!
【Rust 笔记】17-并发(上)
MySQL advanced part 1: stored procedures and functions
LeetCode 1200. Minimum absolute difference
Leetcode recursion
[rust notes] 17 concurrent (Part 2)
4. 对象映射 - Mapping.Mapster
[rust notes] 14 set (Part 2)
1040 Longest Symmetric String
2021apmcm post game Summary - edge detection
Overview of variable resistors - structure, operation and different applications
开源存储这么香,为何我们还要坚持自研?
927. 三等分 模拟
QQ电脑版取消转义符输入表情
LeetCode-61
Traditional databases are gradually "difficult to adapt", and cloud native databases stand out
LVS简介【暂未完成(半成品)】
1.14 - 流水线