I have the following code which I believe to be correct and transpiler ES6/Babel option on but I get the following error.
"error"
"TypeError: nums.find is not a function
at qezoze.js:11:18
at qezoze.js:16:3
at https://static.jsbin.com/js/prod/runner-3.34.2.min.js:1:13603
at https://static.jsbin.com/js/prod/runner-3.34.2.min.js:1:10524"
This is my code at JS bin (https://jsbin.com/qezoze/edit?js,console)
/*jshint esnext: true */
(function() {
'use strict';
let nums = [1,2,3,4,5];
let one = nums.find(num => num === 1);
console.log(one);
}());