Skip to content

Instantly share code, notes, and snippets.

@julianchams
julianchams / calculator.js
Created October 2, 2014 20:43
Homework #3
function squareNumber(num) {
var squaredNum = num*num;
console.log('The result of squaring the number ' + num + ' is ' + squaredNum);
return squaredNum;
}
function halfNumber(num) {
var halfNum = num/2;
console.log('Half of ' + num + ' is ' + halfNum);
return halfNum;