VS Code Short-Cuts - Present to the class 4 short-cuts each, why and how to use them.
-
Blog Post 201 (But you name it something interesting!)
-
Date & Time
PROMPT: Two Eggs and 100 Floors The following is a description of the instance of this famous puzzle involving 2 eggs and a building with 100 floors.
Suppose that we wish to know which stories in a 100-story building are safe to drop eggs from, and which will cause the eggs to break on landing. What strategy should be used to drop eggs such that total number of drops in worst case is minimized and we find the required floor.
We may make a few assumptions:
- An egg that survives a fall can be used again.
- A broken egg must be discarded.
- The effect of a fall is the same for all eggs.
- If an egg breaks when dropped, then it would break if dropped from a higher floor.
- If an egg survives a fall then it would survive a shorter fall.
-
DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
VS Code Packages - Present to the class 2 each useful and under utilized packages for VS Code.
-
Blog Post 201 (But you name it something interesting!)
-
Date & Time
PROMPT: Hourglasses Puzzle How do you measure 9 minutes from a 4 minutes hourglass and a 7 minutes hourglass?
-
DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
How do you learn to learn?
-
Link
-
Link
PROMPT Take an array of numbers, raise them by the power of two and return the sum of the new array
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
6 (3 each) Node commands that haven't been covered so far.
-
Link
-
Link
PROMPT: FizzBuzz Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
6 (3 each) Useful Git commands that haven't been learned yet.
-
Link
-
Link
PROMPT Write a function that determines if a string contains all unique characters.
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Explain how to use the debugging tool in VS Code and how to debug code with it.
-
Link
-
Link
PROMPT Build a program to find the length of the longest word in a string excluding punctuation and removing whitespace
const myString = "This is for your own personal journey. May you have excellent navigation as a developer using your own compass."
findLongestWord(myString) => 'navigation', 10- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Explain and demonstrate to your fellow students 1) Template Literals in ES6 and 2) What and how to use Multi-line Strings in ES6
-
Link
-
Link
PROMPT 1
Return unsorted scores in a descending sorted array.
/*Example*/
const unsortedScores = [37, 89, 41, 65, 91, 53]
sortedScores(unsortedScores) => [91, 89, 65, 53, 41, 37]PROMPT 2
What will be the output of the code below? console.log(0.1 + 0.2 == 0.3);
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Explain and demonstrate to your classmates 1) what and how to use the Destructuring Assignment in ES6 and 2) what and how to use Classes in ES6
-
Link
-
Link
PROMPT 1
Take in an array and return it in reverse order.
PROMPT 2
Make this work:
duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5]- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
-
Link
-
Link
PROMPT 1
Given an array of numbers, raise each number by the power of 2 and return the sum of all the numbers that are evenly divisible by 4.
const myArr = [1, 5, 10, 4, 2] // => 120PROMPT 2
How would you make this work?
add(2, 5); // 7
add(2)(5); // 7- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Explain and demonstrate to your fellow classmates 1) the Block-Scoped constructs let and const. Why were they created and how do we use them? As well as, 2) Default Parameters in ES6
-
Link
-
Link
PROMPT 1
Build a function that would determine if a string was a palindrome?
PROMPT 2
What value is returned from the following statement?
"i'm a lasagna hog".split("").reverse().join("");- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Describe to the class 1) what function overloading is in class in JavaScript? 2) How to empty an array in JavaScript?
-
Link
-
Link
- Given an array “nums”, write a function to move all 0’s to the end of the array while maintaining the relative order of the non-0 numbers:
Input: [0,1,0,3,12]
Output: [1,3,12,0,0]-
What is the value of
window.foo? ( window.foo || ( window.foo = "bar" ) ); -
Summing the Array: Given an array of numbers return the sum of all the numbers
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Mac User: Introduce to the class, iterm and why it's a fun and useful terminal replacement. Offer to the class 3 beginner friendly tips and 3 beginner friendly configurations. If you've already discussed iterm in class, offer to your classmates 5 new configurations to improver yours and their workflow.
Windows User: Introduce ConEmu and why it's a fun and useful terminal replacement. Offer to the class 3 beginner friendly tips and 3 beginner friendly configurations. If you've already discussed ConEmu in class, offer to your classmates 5 new configurations to improver yours and their workflow.
-
Link
-
Link
-
Hand built Bubble Sort
-
Given an array, find the maximum value of the array
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Explain to the class what is Node. What are Node Modules? What is npm used for? Why do we need to use npm and node? How do you import a Node module into a project?
-
Link
-
Link
-
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Build a function to find the sum of all the multiples of 3 or 5 below 1000.
-
Hand build Merge Sort
-
What is the outcome of the two alerts below?
var foo = "Hello";
(function() {
var bar = " World";
alert(foo + bar);
})();
alert(foo + bar);- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Introduce and interest people in the event loop in Javascript.
-
Link
-
Link
-
Each new term in the Fibonacci sequence is generated by adding the previous two numbers. By starting with 1 and 2, the first 10 numbers will be:
-
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... -
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
-
-
What is the value of
foo.length?
var foo = [];
foo.push(1);
foo.push(2);- Quick Sort by hand
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Bring to the class an example of an async function with await variables. What do they do? Why would we use them and how do we use them?
-
Link
-
Link
-
Hand-build reduce sort function.
-
What is the value of foo.x in the code below?
var foo = {n: 1};
var bar = foo;
foo.x = foo = {n: 2};- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Prepare an example of using Quokka.js and share with the class what it does and how to use it.
-
Link
-
Link
-
Hand-build filter sort
-
What does the following code print?
console.log('one');
setTimeout(function() {
console.log('two');
}, 0);
Promise.resolve().then(function() {
console.log('three');
})
console.log('four');- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
What is the difference between the fetch API and isomorphic-fetch? Why will we need to use it and how do you use it?
-
Link
-
Link
-
Write a function to print the first "10" prime numbers
-
Write a JavaScript function to extract unique characters from a string.
- Example string:
"thequickbrownfoxjumpsoverthelazydog" => Expected Output : "thequickbrownfxjmpsvlazydg"
-
What is the difference between these four promises?
doSomething().then(function () {
return doSomethingElse();
});
doSomething().then(function () {
doSomethingElse();
});
doSomething().then(doSomethingElse());
doSomething().then(doSomethingElse);- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
Get even better with VS Code. How to: Multiple Cursors *Select multiple line Select pieces within elements from child to parent to parent to parent Collapse and Expand Move blocks of code() *Select matching letters Add at least 8 more to this list. Really provide yourself and your classmates with short-cuts to make you stronger and faster developers.
-
Link
-
Link
- Take an array of prices where each index represents a time, i.e. every minute or every hour. Build an algorithm to find out what your best profit could have been if you bought at the lowest price and sold at the highest price, after you bought. You must buy before your sell
const myArr = [75, 39, 44, 1, 8, 10, 1, 11, 2, 3, 4, 5]
findBestSellAndBuy(myArr) =>
"maxProfit is 10 if you buy at myArr[3] for 1 and sell at myArr[7] for 11"- Given a string and the index of the desired '(', return the index of its pair ')' even if the string has multiple '(' and ')'.
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
1) Babel.js. Why do we need it and how to use it. 2) What does the spread operator do and how do you use it? 3) What are two new features of ES7?
-
Link
-
Link
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...
-
something
-
something
-
xplain why the following doesn't work as an IIFE:
-
function foo(){ }(); -
What needs to be changed to properly make it an IIFE?
-
-
Build a binary search.
- In its simplest form, binary search is used to quickly find a value in a sorted sequence (consider a sequence an ordinary array for now). We’ll call the sought value the target value for clarity. Binary search maintains a contiguous subsequence of the starting sequence where the target value is surely located. This is called the search space. The search space is initially the entire sequence. At each step, the algorithm compares the median value in the search space to the target value. Based on the comparison and because the sequence is sorted, it can then eliminate half of the search space. By doing this repeatedly, it will eventually be left with a search space consisting of a single element, the target value.
- DISCUSSION
git checkout masterORgh-pages(whichever is your origin)- then
git pullchanges, - create a new branch
git checkout -b new-branch - make changes in VS code & save,
git add .then...git commit -m "add a detailed message"git push -u origin new-branchthem up to the remote repo on GitHubgit checkout masterORgh-pagesto switch back to origin branch and do it all over again...