MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / next

Function next

assets/js/BackgroundEffect.js:12–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 var colors = ["#FF6138", "#FFBE53", "#2980B9", "#282741"];
11 var index = 0;
12 function next() {
13 index = index++ < colors.length - 1 ? index : 0;
14 return colors[index];
15 }
16 function current() {
17 return colors[index];
18 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected