Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Find the missing number in array
// Find the missing number in array // Using total count algorithm var arr = [1,2,3,5,6,7,8,9]; var total = (arr.length+1)*(arr.length+2)/2; for(i = 0; i < arr.length; i++) { total = total - arr[i]; } console.log(total);
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
JSON parse
Add property to object
Accept matching keys in object
problem_name
neural spam network
Include object in a query string
Union of two sorted arrays
Add items on Set
Rest Params
Tree Structure
stackse - search stackoverflow differently
Please log in to post a comment.