The Beginning Stage of Learning JavaScript
Tags: beginners, codenewbie, javascript, programming
Published: 2022-02-21 15:00:36

> [Winter is coming..](https://www.youtube.com/watch?v=gxhknGARGt4) - GoT

The inevitable has arrived.. 

Javascript!

The beast of a language I tried learning on my own this summer. The language that pushed me to defeat. The language that humbled my ability to learn the wilderness. The language that drowns you in the [trough of sorrow](https://www.youtube.com/watch?v=HKGQFkWI_bM). 

With the support of my family and 100Devs community, I'm confident in my ability to not give up on learning JavaScript. 

I am ready to put my pride and ego aside to ask for help in any assignment we are thrown at the next upcoming classes. 

<iframe src="https://giphy.com/embed/65HR2UL6nn6XMSUoRA" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/boomerangtoons-scooby-doo-boomerang-65HR2UL6nn6XMSUoRA"></a></p>

## Variables

What is a variable? 

- The entity we use to store a value.

With variables, we are able to declare it and set a value.

![variable1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1645435729790/hTf1pz_PL.png)

We can use three keywords to declare variables:

- let - modern way
- const - like let, except value cannot be changed
- var - old school 

Good practice when naming variables is:

- Use camelCase
- Name it to be understandable **by all**

I did not feel much struggle when learning about declaring variables with the help of Leon's explanation.  

## Functions

What is a function?

- The main building block of code in a program, allowed to be called many times without repetition.

To declare it, we can do so by:

![Screen Shot 2022-02-21 at 6.39.47 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1645436429215/TdBcsNaid.png)

What I noticed when learning functions is that I find it difficult to implement in real-world problems. On one hand, it's a bit easier following an example given for me to learn, but to create my own function off of a task is a tad bit harder. 

I trust the process of learning and doing, but it still hasn't clicked yet for me. 

Confession time. 

It was functions where I stopped learning JavaScript in the Summer and fell in the trough of sorrow. At the time, I was learning the fundamentals through [The Odin Project](https://www.theodinproject.com/paths/foundations/courses/foundations), and reading from [javascript.info](https://javascript.info/function-basics#functions-comments) was the exact website directed to learning it. 

Now, reading it again with a new mindset has changed my view on learning. Also, [Anki](https://ankiweb.net/about) is clutch. 

<iframe src="https://giphy.com/embed/26xBHRD8QRBzVpbI4" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/staronfox-star-on-fox-26xBHRD8QRBzVpbI4"></a></p>

## What's the goal with JavaScript in 100Devs?

> Functions, Loops, Variables, and Conditionals will lead you to success in the long run. - Leon

These four concepts are important to Leon because he knows with experience will land us jobs in the future, and learn any language with hard work and discipline. 

## Conclusion 

It's only the beginning of learning JavaScript, and I feel great going into the programming language. I can't get ahead of myself or be too excited because it's only the basics. The rule of thumb I'm going with:

> Trust the process and take it one day at a time - my head

Will it get harder? HYFR! Is there an entire community to turn to for help? YES! 

If you would like to talk about your JS experience so far, reach me on [Twitter](https://twitter.com/codewithfan)!

Cheers ~ [Stefan's Blog](https://codewithfan.hashnode.dev/)

<iframe src="https://giphy.com/embed/yvX2sij2wAoM1jxgRR" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/halloween-yvX2sij2wAoM1jxgRR"></a></p>


## Sources

- https://javascript.info/function-basics#function-declaration