- Feynman Writing Prompts - Write out explanations of the following concepts like you are explaining it to a 12 year old. Doing this will help you quickly discover any holes in your understanding. Ask your questions on Slack.
-
Variables: A variable names a location where a piece of information is stored. I think of it as an address to your favorite restaurant. The address is the variable which tells you were to look for the building. And the building is the stored information.
-
Strings: Sequences of characters like ‘Hello Word’ is a string. A string is a data type.
-
Functions (arguments,
return
): I think of a function as reusable instructions or a recipe. Arguments are given to the function which the instructions in the function tells the computer what to do with the arguments. An argument is a piece of data this is plugged into the function to complete the instructions. -
if
statements: An ‘if’ statement can be used to check a condition and then execute an action if the statement is true or false. They are best used inside of a function where an argument can be passed to it. My favorite example: my function is to pet a dog and the argument is animal. My ‘if’ statement would be; if animal equals ‘dog’ then go pet it. If animal does not equal ‘do’g then don’t pet. And to tie in other vocab, ‘dog’ is considered a string. -
Boolean values (
true
,false
): Fairly straight forward; these Boolean values can help us test to see if a statement is either true. So, if we are looking to see if the number that is being passed into a function meets a certain condition it will return a true value, and if it doesn’t the function will return with a false value. That’s one simple example of how to use Boolean values. Also, if a variable is empty, undefined, NaN, 0, or null that variable is false.
-
Install Node and NPM. NPM comes packaged with Node. https://nodejs.org/en/download/
-
Install SublimeText3. If you have another editor that you prefer then you can use that. https://www.sublimetext.com/3
-
Download this project folder from GitHub.
-
Navigate into the downloaded folder using Terminal(Mac) or Command Prompt(Windows).
ls
(Mac),dir
(Windows) andcd <directory_name>
are the commands you need to navigate around. -
Once you are in the folder type the command
npm install
. This will fetch all of the needed requirements for the project. -
Run
npm test
to run the automated tests. At first all of the tests will be broken. You will fill out the functions inexercises.js
to make the tests pass.
For more information about Lambda School's six month CS program visit: https://lambdaschool.com