Created
September 14, 2018 06:11
-
-
Save funnythingz/434c9d23107038039935bec95928b5c4 to your computer and use it in GitHub Desktop.
QuestionSlideFactory.js
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
const questionSlideFactory = new QuestionSlideFactory(); | |
for(var i = 0; i < 3; i++) { | |
$('なんちゃら').html(questionSlideFactory.createQuestionSlide(i)); | |
} | |
function QuestionSlideFactory(){ | |
} | |
QuestionSlideFactory.prototype.createQuestionSlide = function(question_id){ | |
if(question_id === 0){ | |
return this.q0(); | |
} | |
if(question_id === 1){ | |
return this.q1(); | |
} | |
if(question_id === 2){ | |
return this.q2(); | |
} | |
if(question_id === 3){ | |
return this.q3(); | |
} | |
} | |
QuestionSlideFactory.prototype.q0 = function(){ | |
return `<section></section>` | |
} | |
QuestionSlideFactory.prototype.q1 = function(){ | |
return `<section></section>` | |
} | |
QuestionSlideFactory.prototype.q2 = function(){ | |
return `<section></section>` | |
} | |
QuestionSlideFactory.prototype.q3 = function(){ | |
return `<section></section>` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment