# Can anyone help me please with the solution to this problem

**URL:** <https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934>\
**Category:** General\
**Created:** [December 29, 2017, 6:58pm UTC](https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934 "2017-12-29T18:58:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nyannue](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nyannue](https://forum.freecodecamp.org/u/nyannue)\
**Post date:** [December 29, 2017, 6:58pm UTC](https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934/1 "2017-12-29T18:58:44Z")

</div>

**Tell us what’s happening:**

**Your code so far**

```auto
function myLocalScope() {
  
  var myVar = "Lawrence";
  
  
  console.log(myVar);
}
myLocalScope();

// Run and check the console
// myVar is not defined outside of myLocalScope
console.log(myVar);

// Now remove the console log line to pass the test

```

**Your browser information:**

Your Browser User Agent is: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36`.

**Link to the challenge:**  
[https://www.freecodecamp.org/challenges/local-scope-and-functions](https://www.freecodecamp.org/challenges/local-scope-and-functions)

---

<div class="post-metadata">

**Author:** ![TomerPacific](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tomerpacific/32/158967_2.png) [@TomerPacific](https://forum.freecodecamp.org/u/TomerPacific)\
**Post date:** [December 29, 2017, 7:10pm UTC](https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934/2 "2017-12-29T19:10:58Z")

</div>

@nyannue,  
read the instructions carefully. It says to follow the comments inside the exercise.

```auto
// Now remove the console log line to pass the test

```

You should remove:

```auto
console.log(myVar);

```

and you shall pass the test

---

<div class="post-metadata">

**Author:** ![nyannue](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nyannue](https://forum.freecodecamp.org/u/nyannue)\
**Post date:** [December 29, 2017, 7:20pm UTC](https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934/3 "2017-12-29T19:20:05Z")

</div>

Thank you, I am really finding it difficult with this course because I am a beginner in programming.

---

<div class="post-metadata">

**Author:** ![nyannue](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@nyannue](https://forum.freecodecamp.org/u/nyannue)\
**Post date:** [December 29, 2017, 7:28pm UTC](https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934/4 "2017-12-29T19:28:09Z")

</div>

It has worked for me, but please be a helper to me. I really want to learn coding at freecodecamp, but I am not still understanding what I am doing.

I will be glad if you can please give me your contacts.  
Here are mine:  
Tels: +231 778314079/880956709  
Emails: [lawrencephillips102@gmail.com](mailto:lawrencephillips102@gmail.com)/nyannueflomo20@gmail.com  
Facebook: Lawrence Phillips/ nyannue Flomo

---

<div class="post-metadata">

**Author:** ![rdev1163](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/rdev1163/32/65004_2.png) [@rdev1163](https://forum.freecodecamp.org/u/rdev1163)\
**Post date:** [December 31, 2017, 1:16am UTC](https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934/6 "2017-12-31T01:16:48Z")

</div>

This piece seems to be touching on the topic of **Scope ([more info](http://clubajax.org/javascript-scope-and-context-not-the-same-thing/))**.

_Scope_ comes in many flavors. To define your _scope_ you could ask, what can your code access? What variables can it reach and use?

Everything your code can touch, is your_scope_. It can be a confusing topic at first. Also , note that detailed and focused questions are a good way for allowing others to best address the parts you are having trouble with.

A Google search for `JavaScript Scope` would give a lot of examples and reads. I’ll list a few I like at the bottom.

[Wikipedia - JavaScript Scope](https://en.wikipedia.org/wiki/Scope_(computer_science)#JavaScript)

[MDN - Function Scope](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions#Function_scope)

[W3Schools - JavaScript Scope](https://www.w3schools.com/js/js_scope.asp)

🙂 ~Happy Hacking~

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 5:12pm UTC](https://forum.freecodecamp.org/t/can-anyone-help-me-please-with-the-solution-to-this-problem/165934/7 "2021-01-16T17:12:55Z")

</div>


