JavaScript for me is a langauge that has a large syntax and also has a way of writing it.

I realized JavaScript has a very similar datatype to Python which data types also include boolean, strings, null value, undefined, symbol, object.

Now I am getting used to learning JavaScript function like

#Alert, Console.log, confirm, prompt,

What I find amazing using JavaScript is the magic of using the same language with other languages like HTML and CSS.

Example of this is using JavaScript HTML methods: getElementById()

Output of using the JavaScript Html methods: getElementById()

Variables can be declared using:

  • let
  • const (constant, can’t be changed)
  • var

Variables defined with const behave like let variables, except they cannot be reassigned:

It took me a while before I could understand the word “ Scope” in JavaScript.

The scope is a policy that manages the accessibility of variables. To simplify this, I will try to declare a variable using const

const word = 'Hello';

Output: 'Hello'

This variable can be log in the next line after the declaration. But when declared outside the scope the variable becomes inaccessible. e.g

console.log (word ) through an error because the if code block creates a scope for word variable. And word variable can be accessed only within this scope. i.e {}.

The blockscope variables includes const and letbut doesn’t includevar

Even when second console.log(count)isn’t within the scope{}, it still displayed it output without throwing an error.

A variable declared inside the global scope is named global variable. Global variables are accessible from any scope.

Looking forward to continuing learning JavaScript Fundamentals.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adeniye Kehinde Afusat

Kehinde is a technology enthusiast, experienced with Azure DevOps. She has expertise in Cloud technologies and software programming.