Ask coding questions

← Back to all posts
Changing JS function Parameters from one way to another
Coding1000 (9)

Hello, I saw this JavaScript Library and he typed a prototype parameter that was only built from one way, but whenever you use it again, you can take away, add extra things from where it was at right now from before like this

const coolZoom = Keyframe.addKeyframes("cool-zoom", {
0: {
transform: "none",
color: "red"
},
50: {
transform: "scale(2)"
color: "blue"
},
100: {
transform: "none"
}
});
Keyframer.animate(
"#title", coolZoom("1s", "ease", "infinite")
() => alert("This runs when the animation is complete!")
);

the coolZoom variable was at first a keyframing and querySelector function but now reusing the function again but with seconds, ease, and infinite, I just want to know how to use the original function parameter but reusing it again but adding and taking and placing extra content into it.

Commentshotnewtop
Coding1000 (9)

I am really sorry if this post is confusing to understand.