New user, sorry if I'll only use the title and description
This is around 6 kyu i think
Inputs are always array
function returnLastNonRepNum(arr) {
for (let i = arr.length ; i > 0; i-- ) {
if (typeof(arr[i]) === 'number' && arr.indexOf(arr[i]) === arr.lastIndexOf(arr[i])) {
return arr[i]
}
}
}
let arr = [ 1, 'a', 6, 'c', 9, 9, 66, 's', 66, '6'];
console.log(returnLastNonRepNum(arr))
// should output 6
// Since Node 10, we're using Mocha.
// You can use `chai` for assertions.
const chai = require("chai");
const assert = chai.assert;
describe("Solution", function() {
it("should test for something", function() {
// Test.assertEquals(1 + 1, 2);
// assert.strictEqual(1 + 1, 2);
});
});