Code Academy JavaScript

For this Assignment, we were to complete the first two section of the JavaScript Tutorial in Code Academy. The first section is an introduction and the second is Functions. After we complete the tutorial, we were to post screenshots from the tutorials on the portfolio. Below are the screenshots:


Talk Console

Here is how we tell Javascript to talk. We ask javascirpt to print words to the console with the below code


My Pic

mathOperators.js

Javascript includes general math operators that you can find on a calculator such as add (+), subtract(-), multiply (*) and divide (/).

My Pic

Comments in JavaScript

Comments are lines that are not evaljuated when the code runs. A single line comment will comment out a single line with //. A Multi-line comments will comment out multiple lines beginning with */ and ending with /*

My Pic

Functions Syntax

A function takes in inputs, does something wuth them and produces an output. In this example, we declared a function using var, we used the function keyword to state that we are making a function, we set a placeholder word anad gave it a specific value and wrote our block of reuseable code. Lastly, we called the function to print out Great to see you, Priscilla.

My Pic

My Pic