当前位置:网站首页>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>
边栏推荐
猜你喜欢
MySQL advanced part 2: storage engine
LaMDA 不可能觉醒吗?
1.15 - input and output system
LeetCode 0107. Sequence traversal of binary tree II - another method
Quickly use Amazon memorydb and build your own redis memory database
实时时钟 (RTC)
Appium automation test foundation - Summary of appium test environment construction
Spark中groupByKey() 和 reduceByKey() 和combineByKey()
LeetCode-54
Appium自动化测试基础 — Appium测试环境搭建总结
随机推荐
QQ电脑版取消转义符输入表情
Leetcode divide and conquer / dichotomy
Sum of three terms (construction)
Leetcode-3: Longest substring without repeated characters
Quickly use Amazon memorydb and build your own redis memory database
leetcode-9:回文数
leetcode-31:下一个排列
1040 Longest Symmetric String
Chapter 6 relational database theory
Traditional databases are gradually "difficult to adapt", and cloud native databases stand out
Leetcode-6108: decrypt messages
Single chip computer engineering experience - layered idea
LeetCode 1200.最小绝对差
Error ora-28547 or ora-03135 when Navicat connects to Oracle Database
【Rust 笔记】15-字符串与文本(上)
Redis publish subscribe command line implementation
4. Object mapping Mapster
1041 Be Unique
1.13 - RISC/CISC
SPI 详解