Friday, February 24, 2017

function show(request) {}

function show(request) {

/*

request come in these flavors: owned, actually owned, and not owned

each of these comes in three flavors: line, spade, and shoulder ... for now

so

show requests look like this:

owned lines
owned spades
owned shoulders

actually owned lines
actually owned spades
actually owned shoulders

not owned lines
not owned spades
not owned shoulders

thus


*/

var requestarray = request.split(" ")
var requesettype = requestarray[0]
var requestedlist = requestarray[requestarray.length - 1]
if (requesttype === "owned") {showowned(requestedlist)}
if (requesttype === "actually") {showactuallyowned(requestedlist)}
if (requesttype === "not") {shownotowned(requestedlist)}

}

No comments:

Post a Comment