Hello All “NotJustTheMeatGuy” here.

I am really getting into JavaScript now, learning little by little and it has been really tough. I am no where near proficient but I can at least understand simple objects. Lol get it because everything in JS is an object. Ok thats not funny but at least I know what different data types in JS are. Recently we have been working on different Methods like Math and Date and how global objects are great tools for you to use as you progress as a developer. They are really interesting but kinda confusing; for example you can use a Date object can be used in a few different ways, I had to solve some problems where I had to call date in a specific way like by value, dateString or by [year, month, date, hours, minus, seconds, milliseconds]. Yeah is seems a bit much but go to W3Schools and they explain what to use and what not to use syntax wise really well. Math is pretty tricky also because you have a good variety of methods to chose from

We also went over building objects using Bracket and Dot Notations to access Object Literals. Click the link to learn more but from what I understand about them is that they are used to access properties or if a property has not been created it creates one by accessing the target object and assigning a value to it like so.

 

var wholeTurkey = {};

turkey.turkeyBreast = ‘2’; // dot notation

turkey[‘turkeyLeg’] =  ‘2’; // bracket notation property names must be a string

 

Maintaining Proper Scope had a strong emphasis put on it and I now understand why.

Why Andrew?

Well my friend JavaScript has this thing called Hoisting and if you place a variable or call a function somewhere and it’s not in the right scope or somethings not defined or somethings called early, your code can break or it can work fine depending on what is happening. I don’t understand why JS does this or has this capability to begin with but its stupid, and I’m pretty sure other developers believe this as well. But it is well that you to know what it is and does so follow this link to learn more.

 

Lastly Algorithms and BIG O notations. An algorithm is pretty much just an explicit and sequential step-by-step set of instructions for performing a specific task which is just writing code. Like say you wanted to make a program that takes an item in an array and adds it to the end of another. The algorithm for that would be each block of code used to get the output. Yeah its that simple but here is an example:

 

mammal= [‘vampire bat’, ‘Virginia opossum’, ‘birds’, ‘Eastern grey kangaroo’, ‘Northern elephant seal’, ‘Human’]; //You have one array

reptilia = [‘turtles’, ‘crocodilians’, ‘snakes’, ‘lizards’]; //You have another array

var mam = mammal; // lets say you want to create a variable for your first array thats a step

var rep = reptilia; // what about creating a variable for you second array another step

//  finding out which item you want to take out that is also a step but you cant see it

// write a piece of code that accomplishes this task.

//You create a function with two parameters to hold your code so it doesn’t muck up the global scope

function test(array1, array2) {

// this is three steps you create the function

// name that function

// add parameters to that function

}

test(mam, rep);

 

Well you get the gist, everything you do to get to the output is a step in code and the code is the algorithm.

Now the Big O notations are different as in it is pretty much useless, unless your working on a big project that requires complexity of an algorithm, well so I’ve been told.

Big O specifically describes the worst-case scenario, and can be used to describe the execution time required or the space used by an algorithm.” – Rob Bell

My instructors say it’s just a good talking point in interviews even if it’s not what your going to be doing in the position you applying for, if you know something about something you are ok. Well that’s it for now until next time.

I have been “NotJustTheMeatGuy!

“BaBYE!”

It's only fair to share...Share on FacebookShare on Google+Share on LinkedInShare on TumblrTweet about this on TwitterShare on Reddit