0
Free MOCK
Apply Internship
Blog
Learning
Roadmap
Others
Login
Intermediate
JavaScript
Find the missing number in an array
Write a function that finds the missing number in an array of integers from 1 to n.
Examples
Input:
[1, 2, 4, 5]
Output:
3
Your Solution
Show Solution
Reset
Output
Run Code
Click 'Run Code' to see the output