Over the Course of week 1 we went over Javascript fundamentals
as well as what we will be doing over the next few weeks
Our lessons were as follows:
Object oriented programming is a programming methodology based around creating objects with attributes and methods which can be called upon, an example of a method would be "console.log()" and calling upon an attribute would look like "objectName.attributeName". data types are the types of data that can be stored in a variable and the common data types are as follows:
Coding fundamentals can be broken down into 3 main categories:
A variable is a storage container for a single piece of data such as a string or a number
The most common way to select which code to run is an if statement which has the following syntax "if (condition) {code to execute if true}". If statements are often followed by an else statement which looks like "else {code to run if condition is false}".
Arrays are a data type that are a sort of list of variables, to initialize an array you can put "arrayName = [example1,example2,example3]"(you can also initialize them with empty square brackets), you can access and alter an array using "arrayName[index]" where index is the location in the list starting from 0
There are 2 main loops that people use when programming:
Functions are snippets of code that can be run by being called upon as well as taking parameters to produce a desired outcome, there are multiple ways to declare a function but my preferred way is:
"function functionName(parameter1,parameter2) {code to be run}"
To call upon a function you can use the following syntax:
functionName(parameters)
The number of parameters a function can have are not limited and can be 0 or over a hundred depending on its use
The javascript challenges were basic challenges focused around functions and array manipulation