Modern JavaScript for everyone: Mastering Modern JavaScript The Right Way
Published: 2022-03-04 09:16:06

A.	What is JavaScript?
B.	What one requires to learn programming
1.	**<u>Introduction</u>**
JavaScript is one of the world’s most popular programming language. It is also a scripting or programming language that allows you to implement complex features on web pages as It makes the webpages interactive displaying timely content updates, interactive maps, animated graphics. JavaScript was invented by Brendan Eich in 1995 
The early versions of JavaScript were called Mocha
2.	**<u>To learn JavaScript one requires to understand the following:</u>**

**a)**	Recognize that you don’t know it and use that as motivation to read on it and get better at it

**b)**	Each time your code works always challenge yourself to learn something new and try out another task. Don’t get comfortable that you are good at it

**c)	Get functional**- functional programming is a programming paradigm where programs are constructed by applying and composing functions.
To get a better understanding of getting functional; Understand the following concepts

**_i.	Immutability_**- This means that we can't change values in variables, objects, or even arrays. Instead, we need to create a new variable, object, or array.

**_ii.	Pure functions_** - This means that functions will always return an output, but  cannot have side effects nor can it rely on external variables or state
**_iii.	Composition_** – This is the functionality of more complex objects. Instead of focusing on what an object is, we focus on _what an object can do
**_iv.	Closures_** - This is an inner function that has access to variables from an outer function. In JavaScript, closures are created every time a function is created, at function creation time
**_v.	Currying_** – This is when we take a function with multiple arguments and then rewrite it as a series of functions, each with one argument
**_vi.	Recursion_** -This is simply a function that calls itself
**d)	Keep up with the latest specs**
Just make sure you keep up with the most recent changes to JavaScript, which means everything from ES2015 on for example you should know the following features from later specs;
_i.	Async functions from ES2017(ES8)
ii.	Object rest/spread properties from ES2018(ES9)_
**e)	Embrace asynchrony**
This model allows multiple things to happen at the same time. You should learn the following tools as well to understand this concept better;
_i.	Promises
ii.	Bonus
iii.	Async/Wait
iv.	Know where the language ends and the framework begin_
**f)	Framework**
If you’re using a framework, make sure you know when you are using JavaScript and when you are using the framework
**g)	Learn about prototypal inheritance**
**h)	Make your code editor fun**
For example, Visual studio (Vs Code) has extensions such as prettier, which are free that can be used to make your project look fun and exciting
**i)	Always Test your code**
Test-driven development  encourages you to start small and break a big problem into many smaller parts
**j)	Build an environment from scratch**
An environment is the data structure that provides storage space. To understand JavaScript better try to create your own environment, rather than reusing the environment that was created previously
**k)	Teach others what you’ve learned**
Have discussions and teach others what you have learnt thus with practice you will understand better the concepts after doing it a number of times.
**l)	Ask questions**
Always ask questions to get clarity and a better understanding of JavaScript and also to learn from others and get different perspectives from other programmers with experience in the same field. We learn by asking questions and willing to learn from others