Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
app.sut module with the factorial function
/// <reference path="./app.js" />
app.sut = (function () {
"use strict";
var sut = {};
var factorial = function (n) {
if (n <= 1) return 1;
return n*factorial(n - 1);
sut.factorial = factorial;
return sut;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.