Created
April 16, 2014 02:23
-
-
Save nowk/10799137 to your computer and use it in GitHub Desktop.
Javascript Function practice
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
/* jshint node: true */ | |
var assert = require('assert'); | |
/* | |
* named function | |
*/ | |
function named() { | |
return; | |
} | |
/* | |
* assigned function | |
*/ | |
var assigned = function() { | |
return; | |
}; | |
describe("function", function() { | |
describe("named function", function() { | |
it("name property returns the name of the function", function() { | |
assert(named.name === "named"); | |
}); | |
}); | |
describe("assigned function", function() { | |
it("name property returns empty", function() { | |
assert(assigned.name === ""); | |
}); | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment