Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. case 'maybe':
  2.  
  3. //tuk ima question, no nqma answer
  4. console.log(MessageHistoryService.history[MessageHistoryService.history.length - 1])
  5.  
  6. if(MessageHistoryService.history[MessageHistoryService.history.length - 1].answer=== choice.option){
  7. console.log("it's the same don't show it")
  8. }else {
  9. console.log('inside else',MessageHistoryService.history[MessageHistoryService.history.length - 1])
  10. MessageHistoryService.addMessage(new MessageHistoryFactory('answer', 'text', choice.option));
  11. console.log('inside else_-> after added',MessageHistoryService.history[MessageHistoryService.history.length - 1])
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement