diff --git a/README.md b/README.md index f02a7fe..16ff6d6 100644 --- a/README.md +++ b/README.md @@ -26,15 +26,15 @@ c = a; ### Your solution here: 1. What is `a`? ``` -a is ... +a is 1 ``` 2. What is `b`? ``` -b is ... +b is bongos ``` 3. What is `c`? ``` -c is ... +c is true ``` ## Activity Concatenation @@ -54,7 +54,8 @@ Result should be: ### Your solution here: 4. Fill in the `console.log()`? ```js -console.log() + + console.log(firstWord + " " + secondWord + " " + thirdWord + " " + fouthWord) ``` Output a console log `The sum of 5 and 10 is 15` where the values for 5 and 10 are saved to variables, and where 15 comes from those variables being summed. @@ -67,38 +68,40 @@ const num2 = 10; 5. How can we make `num3` equal to the sum of `num1` and `num2`? ```js // your solution here +num3=num1+num2 + ``` -6. Use variables `num1`, `num2` and `num3` to fill in the `console.log()` to complete the sentence: +6. Use variables `num1`, `num2` and `num3` to fill in the `console.log()` to complete the sentence: >The sum of 5 and 10 is 15 ```js -console.log() +console.log(num3=num1 + num2) ``` ## Activity Comparisons By just looking at the following expressions, determine in your mind whether or not each will evaluate to true or false ``` a) 999 > 999 -b) 999 === 999 +b) 999 === 999 c) 999 !== 999 d) -5 >= -4 e) 100 <= -100 -f) 20 + 5 < 5 +f) 20 + 5 < 5 g) 81 / 9 === 9 h) 9 !== 8 + 1 ``` ### Your solution here: 7. Write `true` or `false` based on the list above ``` -a) -b) -c) -d) -e) -f) -g) -h) +a)false +b) true +c)false +d)false +e)false +f)false +g)true +h)false ``` ## Activity Conditionals @@ -114,6 +117,20 @@ Write a conditional statement that... 8. Write your javascript solution below ```js // your answer here +function printFizz(number) { + if (number % 3){ + console.log('Fizz'); + } +if (number % 5) { +console.log('Buzz'); +} +if (number % 3 and % 5) { +console.log('FizzBuss'); +} +else { + console.log(number); +} +} ``` #### BONUS @@ -133,4 +150,4 @@ For more practice read about... - https://javascript.info/operators - https://javascript.info/comparison - https://javascript.info/ifelse -- https://javascript.info/logical-operators \ No newline at end of file +- https://javascript.info/logical-operators