CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 09:33:18 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=9c7096fc47168dacf67114781aaa692b3b0d43fd7e6550b6e08cc38a8933c122a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%223kAlGZsJoWY0WnO-eTVgh6bZBS9JMlYc%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cd5aebdff6c1d2-BLR
addAndRemove - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function addAndRemove0(arr) {
- 'use strict'
- let workArr = arr
- let outputArr = []
- let index = 0
- for (let i = 0; i < workArr.length; i++) {
- if (workArr[i] === 'add') {
- outputArr[index] = (i + 1)
- index++
- }
- else if (workArr[i] === 'remove') {
- if (index !== 0) {
- outputArr[index - 1] = undefined
- index--
- }
- else
- outputArr[0] = undefined
- }
- }
- let output = ''
- let lengthArray = 0
- while (outputArr[lengthArray] !== undefined) {
- lengthArray++
- }
- for (let i = 0; i < lengthArray; i++)
- output += outputArr[i] + ' '
- if (lengthArray === 0)
- console.log('Empty')
- else
- console.log(output)
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ MAKE $2000 INSTANTLY ✅ NEVER SEEN BEFORE ⭐...
JavaScript | 2 sec ago | 0.24 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ N
JavaScript | 10 sec ago | 0.24 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 11 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D G⭐⭐
Java | 12 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 20 sec ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ 7
JavaScript | 21 sec ago | 0.24 KB
-
⭐⭐⭐Exchange Exploit T I⭐⭐
Java | 25 sec ago | 0.10 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 29 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand