Learning a new language is always tough. It involves developing an understanding of basic concepts through hard work and repetition while familiarizing oneself with the subtle nuances, such as proper syntax, that aid in its “real world” implementation. Once that foundation has been established, that sudden revelation when random bits of information morph into something tangible, something useful to the point where it becomes second nature is a truly rewarding experience. Such is the case when learning the how to become a coder for JavaScript.

This programming language consists of datatypes such as numbers (aka: floating point numbers/decimals), strings (aka:text, letters etc.) that require quotes and Boolean operators (True and False). Variables are where the data in JavaScript is defined and stored. Some examples:

var monthlyRent = 1000;

monthlyRent is a variable created to store the number 1000.

var myName = “Juan”;

myName is a variable created to store a specific string that defines something, in this case my name.

Strings can also be concatenated to combine variables and produce a multitude of values. One method is to use the (+) operator as follows:

var myFirstName = “Juan”

var mySecondName = “Crespo”

var myFullName = (“Juan” + “Crespo”)

Logical Operators can be used in many different ways such as to define values and preform simple to complex calculations. The three that we have learned so far are:

&& (and) a binary operator that can only produce a true statement is both values are true

var x = 3

var y = 5

(x < 10 && y > 1) is true

(x < 10 && y == 1) is false

|| (or) requires only one true condition for it to be true

(x < 10 II y > 1) is true

(x == 10 II y == 1) is false

! (not) flips the value

!(x === y) is true

console.log is a command used to print out the data values to your browser

console.log (x + y) ultimately displays the value of 7

We also learned about conditional statements in order to have the code perform a variety of actions and decisions.

The if statement executes a block of code if the condition is true.

var wins = “”

undefined

if (wins < 40) {

greeting = “We had a bad season”;

}

“We had a bad season”

The else statement executes a block of code if the condition is false.

if (wins < 40) {

greeting = “We had a bad season”;

}

“We had a bad season”

else {

greeting = “On to the playoffs”

}

The else if statement executes a block of code if the first condition is false.

if (wins < 40) {

greeting = “We had a bad season”;

}

“We had a bad season”

else if {

greeting = “Team is improving”

else {

ahead.greeting = “On to the playoffs”

}

I have a long way to go before I even contemplate classifying myself as anything other than a coding novice but this is a really exciting time for me. I’m looking forward to incrementally increasing my understanding of JavaScript as well as other programming languages in the days, months and years ahead.

Like what you read? Give jcres053 a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.