alongubkin / alongubkin/spider

List Comprehensions: undefined existing list

Open
#125 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
46
PR merge metrics
No merged PRs in 30d

Description

I wonder why this isn't reported yet, maybe I'm missing something?

```
var lst = [0, 1, 2];
var lst2 = [n*n for n in lst];
```

I expect `lst2` to equal `[0, 1, 4]`, but compilation fails with

```
line 2 col 26 undefined lst
var lst2 = [n*2 for n in lst];
^^^
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.