Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx22
var assert = require('assert');function find_peak_element(arr) {    //fill this in}try {    assert.equal(find_peak_element([1, 2, 3, 1]), 2);    console.log('PASSED: ' + "assert.equal(find_peak_element([1,2,3,1]), 2)");} catch (err) {    console.log(err);}try {    assert.equal([1, 5].includes(find_peak_element([1, 2, 1, 3, 5, 6, 4])), true);    console.log('PASSED: ' + "assert.equal([1, 5].includes(find_peak_element([1, 2, 1, 3, 5, 6, 4])), true)");} catch (err) {    console.log(err);}OUTPUT
Results will appear here.