Skip to content

Instantly share code, notes, and snippets.

@nowk
Created April 16, 2014 02:23
Show Gist options
  • Save nowk/10799137 to your computer and use it in GitHub Desktop.
Save nowk/10799137 to your computer and use it in GitHub Desktop.
Javascript Function practice
/* 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