workshopper / workshopper/javascripting
Scope Problem is Confusing
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 2.9k
- Forks
- 1k
- Merge medio
- 14 h 47 min
- PR fusionados (30 d)
- 1
Descripción
As someone who has no previous JavaScript knowledge, the Scope problem is quite frustrating. Even though the introduction does a good job defining scope, I was not prepared to follow the code example.
Comments need to be added next to console.log to indicate that when we pass the argument within bar back to the function, var b = 2 will be ignored. I'm sure I haven't phrased that well, but it's a starting point.
Also, what purpose does the line foo(); // 4, 2, 48 serve? I understand that foo is the function's name, and the comments next to it are the values of these variables, but this statement is just sitting there. We need context. What would including foo(); at the end of this program do when we run it?
I also don't believe the IIFE section adds any relevant information to this problem. It is distracting.
Now moving on to the challenge, I don't understand why there is )(); after every closing }. I suppose that ties back to the foo(); in the example code, but I don't understand its usage.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la introducción al problema de Scope, el ejemplo de código, la sección sobre IIFE y el desafío mencionado en la issue. Aclara qué hace llamar a foo(), explica el comportamiento relevante de console.log y la sintaxis final )();, y considera si la sección sobre IIFE debe incluirse. Se considerará terminado cuando un principiante de JavaScript pueda seguir el ejemplo y entender las instrucciones del desafío.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- documentation
- Tipo de issue
- Documentación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100