Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. quesListArray = [
  2. {
  3. QuestionTypeID : 1,
  4. QuestionTypeName : 'Rating'
  5. },
  6. {
  7. QuestionTypeID : 2,
  8. QuestionTypeName : 'Yes/No'
  9. },
  10. {
  11. QuestionTypeID : 3,
  12. QuestionTypeName : 'Rating - Matrix'
  13. },
  14. {
  15. QuestionTypeID : 4,
  16. QuestionTypeName : 'Yes/No - Matrix'
  17. }
  18. ]
  19.  
  20. for(let x of this.quesListArray) {
  21. if(x.QuestionTypeID == 1 && x.QuestionTypeID == 3) { // realised it's incorrect condition
  22. // return true or false
  23. }
  24. }
  25.  
  26. this.quesListArray.includes(this.QuesListArray[..]) // Was not sure that what to write so as to get both ID's condition.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement