const foo = x => {
var y = x * 2
return function bar(z) {
if (z.length > 3) {
return z.map(
(baz = v => {
if (v > 3) return v + y
else return baz(v * 4)
})
)
} else {
var obj = []
const bam = () => {
obj.length = 1
obj[0] = this.w
}
setTimeout(bam.bind(this), 100)
return obj
}
}
I wanna convert "bar" function to arrow function, so what should i do with the 2 "this" inside?