Skip to content

Instantly share code, notes, and snippets.

View rexfordkelly-at-makersquare's full-sized avatar

rexfordkelly-at-makersquare

View GitHub Profile
//1. Write a function average that takes two numbers as input (parameters), and returns the average of those numbers.
function average(num1, num2) { // Good Job!
return (num1 + num2) / 2;
}
//2. Write a function greeter that takes a name as an argument and greets that name by returning something along the lines of "Hello, <name>!"
function greeting(name) { // Good Job!
console.log('Hello ' + name + '!');
}
@rexfordkelly-at-makersquare
rexfordkelly-at-makersquare / checkpoint1.js
Last active August 25, 2016 00:58 — forked from hartbeatnt/checkpoint1.js
Nate Hart's Checkpoint 1
/*Write a function average that takes two numbers as input (parameters),
and returns the average of those numbers.*/
function average(num1, num2) { // Good Job!
return (num1 + num2) / 2;
}
/*Write a function greeter that takes a name as an argument and greets
that name by returning something along the lines of "Hello, <name>!"*/
W2D2 Checkpoint
function average(x,y) { // Good Job!, try and keep your spacing and formating consistent
return (x+y)/ 2;
}
function greeter(name) { // Good Job!
return 'Hello, '+ name;
}
# W2D2 Checkpoint
Submit a link to your gist [here](https://goo.gl/forms/HywFjkNIU9mLM7c03)
1. Write a function `average` that takes two numbers as input (parameters), and
returns the average of those numbers.
function average (num1, num2) {// Good Job!
return ((num1 + num2) / 2) // do we need the wrapping parens?
}
/**
Noah Loring
*/
// #1
function average (num1, num2) { // Good Job!
return (num1 + num2)/2;
}
Daniel Kim W2D2 checkPoint
1.
function average (x,y) {// good job
return (x+y)/2;
}
2.
function greeter (name) {// good job
/* 1. Write a function average that takes two numbers as input (parameters), and returns the average of those numbers. */
var average = function(x , y){ // Good Job!
return (x+y)/2; // Try and keep your spacing consistant.
};
/* 2. Write a function greeter that takes a name as an argument and greets that name by returning something along the lines of "Hello, <name>!" */
var greeter = function(name){ // Good Job!
return "Hello, " + name + "!";
# W2D2 Checkpoint
Submit a link to your gist [here](https://goo.gl/forms/HywFjkNIU9mLM7c03)
1. Write a function `average` that takes two numbers as input (parameters), and
returns the average of those numbers.
function average(num1,num2){ // Good Job!
return (num1 + num2) / 2;
}
@rexfordkelly-at-makersquare
rexfordkelly-at-makersquare / w2d2-checkpoint-ej-mason.js
Last active January 5, 2023 08:23
Week 2 Day 2 Checkpoint for Eliot Mason
/*
EJ Mason
August 23, 2016
Week 2
----------------------------------------------------------------------------------
W2D2 Checkpoint
----------------------------------------------------------------------------------
*/
<!DOCTYPE html>
<html>
<head>
<title>Day 2</title>
</head>
<body>
<script type="text/javascript">
var name = "Rex Kelly";