This file contains hidden or 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
using System; | |
namespace headsOrTails | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Random rand = new Random(); | |
int numberOfGames = 1; |
This file contains hidden or 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
Cat Pics - https://jsbin.com/zerado/1/edit?html,css,js,output | |
FizzBuzz - https://jsbin.com/kezarir/2/edit?html,css,js,output | |
Lightbulb - https://jsbin.com/casevex/3/edit?html,css,js,output |
This file contains hidden or 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
most frequent word - https://jsbin.com/wipuwez/3/edit?js,console | |
object recipe - https://jsbin.com/sahujas/edit?js,console | |
merged data streams - https://jsbin.com/feqifuk/8/edit?html,js,output |
This file contains hidden or 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
Here are the links to the objects basics answers. | |
- Key Deleter https://jsbin.com/powifo/2/edit?js,console | |
- Self Reference https://jsbin.com/hohuzid/2/edit?js,console | |
- Object Creator https://jsbin.com/honawe/1/edit?js,console | |
- Object Updater https://jsbin.com/bavuciw/2/edit?js,console |
This file contains hidden or 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
* What is scope? Your explanation should include the idea of global vs. local scope. | |
- Simply put scope is where and how a variable is available in your code. There are two types Global and local. | |
Global variables are available anywhere in your code and are easy to accidentally change later on in your code, so they should be avoided. | |
Local scope or local variables only exist in the context in which they are defined such as a variable inside a function. | |
* Why are global variables avoided? | |
- Global variables are often avoided because they can lead to unintended side effects in your program or easily be overwritten\ | |
later on in the program. | |
* Explain JavaScript's strict mode |
This file contains hidden or 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
fizzBuzz link: https://jsbin.com/jazihu/1/edit?js,console,output | |
array average link: https://jsbin.com/nusiga/2/edit?js,console | |
min and max link: https://jsbin.com/topugu/edit?js,console |
This file contains hidden or 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
// STOPLIGHT | |
function doTrafficLights() { | |
var activeLight = getActiveLight(); | |
// your code will replace this call | |
// to `console.log()` | |
if (activeLight == "red") { | |
turnRed(); | |
} else if (activeLight == "yellow") { | |
turnYellow(); |
This file contains hidden or 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
// SQUARE AREA | |
function computeArea(width, height) { | |
// your code here | |
return width * height; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
This file contains hidden or 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
// WISEPERSON GENERATOR | |
function wisePerson(wiseType, whatToSay) { | |
// your code here | |
var phrase = 'A wise ' + wiseType + ' once said: "' + | |
whatToSay + '".' | |
return phrase; | |
} | |
/* From here down, you are not expected to |
This file contains hidden or 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
require 'date' | |
class PerDiem | |
attr_accessor :start_date, :end_date, | |
def initalize(start_date, end_date, per_diem) | |
@start_date = start_date |
NewerOlder