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

Function create

assets/js/simon.js:15–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13//creating array as answer
14
15function create(){
16 heading.innerHTML="LEVEL: "+len +" of Simon's Game";
17 if(len==1){
18 ans[len-1]=Math.ceil(Math.random()*1000)%4;
19 console.log(ans);
20 }
21 else{
22 ans[len-1]=Math.ceil(Math.random()*1000)%4;
23 console.log(ans);
24 }
25 //fading in and out next element of the sequence
26 var id;
27 id=ans[len-1]+1;
28 console.log(id);
29 $("#c"+id).fadeOut().fadeIn();
30 i=0;
31}
32//reading inputs
33b1.onclick=function(){
34 var flag=0;

Callers 1

simon.jsFile · 0.70

Calls 1

$Function · 0.70

Tested by

no test coverage detected