当前位置:网站首页>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>
边栏推荐
猜你喜欢

liunx启动redis

Sqlmap tutorial (II) practical skills I

MatrixDB v4.5.0 重磅发布,全新推出 MARS2 存储引擎!

Data visualization chart summary (I)

Appium foundation - use the first demo of appium

Groupbykey() and reducebykey() and combinebykey() in spark

Real time clock (RTC)

传统数据库逐渐“难适应”,云原生数据库脱颖而出

SQLMAP使用教程(二)实战技巧一

Overview of variable resistors - structure, operation and different applications
随机推荐
Operator priority, one catch, no doubt
【Rust 笔记】17-并发(上)
实时时钟 (RTC)
How to understand the definition of sequence limit?
LVS简介【暂未完成(半成品)】
RGB LED infinite mirror controlled by Arduino
Single chip computer engineering experience - layered idea
SPI 详解
The difference between CPU core and logical processor
Leetcode-31: next spread
【Rust 笔记】15-字符串与文本(下)
Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
做 SQL 性能优化真是让人干瞪眼
leetcode-6108:解密消息
Redis publish subscribe command line implementation
1.13 - RISC/CISC
高斯消元 AcWing 884. 高斯消元解异或线性方程组
Collection: programming related websites and books
[rust notes] 14 set (Part 2)
1041 Be Unique