代码拉取完成,页面将自动刷新
?> 背景知识: linear-gradient
<script v-pre type="text/x-template" id="zebra-stripes"> <style> main { width: 100%; } pre { width: 100%; display: inline-flex; background: #f8f8f8; background-image: linear-gradient(rgba(18,18,18,.05) 50%, transparent 0); background-size: auto 48px; background-origin: content-box; font: 14px/24px Consolas, Monaco, monospace; } main pre > code { display: inline-block; padding: 0; color: #34495e; background-color: transparent; font: inherit; } </style>
const pull = (arr, ...args) => {
let argState = Array.isArray(args[0]) ? args[0] : args;
let pulled = arr.filter((v, i) => !argState.includes(v));
arr.length = 0;
pulled.forEach(v => arr.push(v));
};
let myArray = ['a', 'b', 'c', 'a', 'b', 'c'];
pull(myArray, 'a', 'c');
console.log(myArray);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。