Javascript Beginnings

August 23, 2020

This is an article that I originally wrote for my Wordpress site but have moved here.

So we just finished week 3 of bootcamp and I am now seeing the value of having kept this blog up either on a daily, every other day or weekly basis. The nature of the immersive bootcamp is that where we are now, all I know is I know more than I knew three weeks ago.

Anyways, at some point towards the end of week 1 and by the start of week 2 we began to learn Javascript. Javascript, like most other languages, is incredibly vast. I will list a few things about Javascript, that go with what we learned in week 2 because week 3, which will be the next blog, was quite intense (Asynchronous Javascript anyone?).

So, week 2, the basics of Javascript.

  • Strings and numbers (literally words and numbers)
  • Booleans (uses evaluators like >, <, <=,>=, etc to determine true or false)
  • Variables (holds something like a ‘word’ or number or eventually lines upon lines of code)
  • If-else statements (if ‘this’ then do this, else ‘do this’) (you can add if conditions within if conditions which are labeled as ‘else if’ statements)
  • Loops (while loop – while ‘this condition’ do this) (for loop – for ‘this condition’ do this). This is an incredible over simplification.
  • Functions – take everything above into a function and every time you want to use that function you can just call the function. The functions definition is all the code you give it (again and incredible over-simplification).
  • Array’s and Objects (Array’s are a list of values which are placed inside [ ]).
  • Objects need their own line and sub-line.
  • Objects are recognized by { }. So the most confusing thing is that Objects are Array’s.
  • Array’s have values [1, 2, 4, 24, 465].
  • The first value in an array is 1. 1 is at an index of 0.
  • So if you want to pull 1 from the array it looks like array[0].
  • If you were to type the array by index it would look like Array[0:1, 1:2, 2:4, 3:24, 4:465] HOWEVER!
  • That format is what an Object is. Object {Key: value, Key: value}.
  • Array’s do not get formatted/typed by index. The index is understood
  • Confused? Me too, google it.
  • Putting html, css and javascript together.
  • Made a calculator. A lot harder than it sounds.

So, that is most of week 2. Like I said, next week will be a little deeper but it might end abruptly due to the complexity and melting of the brain when thinking about Asynchronous programming.

Till next time,

– Ben