Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jumping on the clouds hackerarnk solution in javascrit

let jumps = 0;
let currentIndex =0;
while(currentIndex<c.length-1){
if(c[currentIndex+2]==0){
jumps += 1
currentIndex+=2;
}
else if(c[currentIndex+1]==0){
    jumps+=1
    currentIndex+=1;
}
}
return jumps
Comment

PREVIOUS NEXT
Code Example
Javascript :: map and get last child in js 
Javascript :: javascript intersection reduce, filter, includes 
Javascript :: disabling first item in dropdownlist 
Javascript :: javascirpt escape tab 
Javascript :: many button with many action in javascript 
Javascript :: typeorm not supporrtted insert large data 
Javascript :: automatically adjust color 
Javascript :: hex decode javascript 
Javascript :: socket cheatsheet 
Javascript :: python range equivalent in javascript 
Javascript :: multiplicar celulas js 
Javascript :: outlet context remix js 
Javascript :: Example of Logical AND assignment operator in es12 
Javascript :: Rest and spread operators in ES6 
Javascript :: ngFor fake 
Javascript :: javascript array keyshort 
Javascript :: javascript python like for loop 
Javascript :: react native red Half Circle bubble 
Javascript :: change color jquery css 
Javascript :: loop through async javascript -2 
Javascript :: how to change elemen size in js when custom page width changed 
Javascript :: preventdefault called two times 
Javascript :: success and failure callback functions js 
Javascript :: adding items to extjs container 
Javascript :: axios get request with body 
Javascript :: dev console with colored font 
Javascript :: jtml cdn enter 
Javascript :: ex:h2p 
Javascript :: javascript to send email on button click 
Javascript :: jquery show function to javascript code 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =