当前位置:网站首页>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>
边栏推荐
猜你喜欢
Chapter 6 relational database theory
1.15 - input and output system
SQLMAP使用教程(一)
Real time clock (RTC)
MySQL advanced part 2: MySQL architecture
2021apmcm post game Summary - edge detection
传统数据库逐渐“难适应”,云原生数据库脱颖而出
Open source storage is so popular, why do we insist on self-development?
Data visualization chart summary (II)
做 SQL 性能优化真是让人干瞪眼
随机推荐
【Rust 笔记】16-输入与输出(上)
4. Object mapping Mapster
A reason that is easy to be ignored when the printer is offline
Sqlmap tutorial (1)
4. 对象映射 - Mapping.Mapster
SQLMAP使用教程(一)
什么是套接字?Socket基本介绍
Presentation of attribute value of an item
Appium自动化测试基础 — Appium测试环境搭建总结
1.14 - assembly line
1041 Be Unique
Network security skills competition in Secondary Vocational Schools -- a tutorial article on middleware penetration testing in Guangxi regional competition
Operator priority, one catch, no doubt
Leetcode-3: Longest substring without repeated characters
[rust notes] 14 set (Part 2)
【Rust 笔记】15-字符串与文本(下)
C - XOR to all (binary topic)
Chart. JS - Format Y axis - chart js - Formatting Y axis
Data visualization chart summary (I)
Multi screen computer screenshots will cut off multiple screens, not only the current screen