Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
GalinaKG
Feb 27th, 2023
694
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
JavaScript
0.23 KB
| None
|
0
0
raw
download
clone
embed
print
report
function
solve
(
arr
,
n
)
{
let result
=
[
arr.
shift
(
)
]
;
arr.
every
(
(
element
,
index
)
=>
{
if
(
(
index
+
1
)
%
n
===
0
)
{
result.
push
(
element
)
;
}
return
true
}
)
;
return
result
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
EXISTENCE > TIME
14 hours ago | 0.65 KB
PSY Chat
1 day ago | 1.35 KB
bs.to css 2.0
2 days ago | 5.49 KB
z66is_archive.zip.txt
2 days ago | 10.69 KB
simple mineing
Lua | 2 days ago | 5.29 KB
minecraft_cc_tweek_mineing_ws
Lua | 3 days ago | 9.70 KB
minecraft_cc_tweek_mineing
Lua | 3 days ago | 4.12 KB
Answering Concerns About City/State in Semant...
3 days ago | 0.90 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
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!