Skip to content
Advertisement

I want to return the last value of y , and the appended list. However, the list is not being returned. It states : name ‘y’ is not defined

I want to return the last value of y , and the appended list. However, the list is not being returned.

It states : name ‘y’ is not defined.

JavaScript

Advertisement

Answer

Remove y list = []. it does not mean anything.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement