Last active
September 6, 2017 00:07
-
-
Save ryan-hamblin/2cec747b05a0e3f2b16e8c56362b249e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var name = 'Ryan'; | |
// name = 'Ben'; | |
// var name = 'Austen'; | |
// console.log(name); | |
function logName() { | |
function foo() { | |
console.log(name); | |
} | |
return foo(); | |
} | |
logName(); | |
var name = 'Jeff'; | |
name = 'Bob'; | |
function test() { | |
var name = 'Susan'; | |
console.log(name); | |
return name; | |
} | |
console.log(test()); | |
console.log(name); | |
var age = 30; | |
if (age > 12) { | |
let dogYears = age * 7; | |
console.log(`You are ${dogYears} dog years old!`); | |
} | |
for ( let i = 1; i <= 21; i++ ){ | |
console.log(i); | |
} | |
let dogsName = 'Grizzly'; | |
dogsName = 'Bear'; | |
console.log(dogsName); | |
const array = [1, 2, 3, 5]; | |
array.push(6); | |
for ( let i = 0; i < array.length; i++) { | |
console.log(array[i]); | |
} | |
const userID = '34jkj3hh23'; | |
console.log(userID); | |
// var if you want dynamic ability to redefind your variable completely | |
// let if you want to block scope your variable and have the ability to reassign what it points to | |
// const if you want the ability to lock er down never reassign what the variable points to. | |
// function sayName(name, age) { | |
// return 'Hello, my name is ' + name + ' and I am ' + age + ' years old'; | |
// } | |
// the code above becomes the next line below!; | |
const sayName = (name, age) => `My name is ${name} and I am ${age} years old`; | |
console.log(sayName('Ryan', 30)); | |
const multiplyByTen = (num) => num * 10; | |
console.log(multiplyByTen(12)); | |
// return num after multiplying it by ten | |
// code here | |
// const multiplyByTen = (num) => 10 * num; ? | |
// const multiplyByTen = (num) => { | |
// return num * 10; | |
// }; | |
// git process | |
// fork repo | |
// clone repo | |
// make changes | |
// git status will show red | |
// git add // the changes can just be '.' | |
// git status will show green | |
// git commit -m 'I made it all work!' | |
// git push -u origin master | |
// steps to submitting your homework/labs; | |
// go to github master reposistory i.e LambdaSchool org; | |
// click on create pull request; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment