I have a statement in my code:
if(!(typeof options.duration[i] === 'undefined'))
I have written it correctly, seems that there is no mistake but the console is throwing error that:
TypeError: options.duration is undefined
It should not show this error.It does not make any sense.