Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Chris Beardsley
Added: Oct 23, 2018 2:46 PM
Views: 25
Tags: no tags
  1. var myaArray = [6, 19, 'marketing:true'];
  2. var myString = 'marketing:true';
  3. for (let i = 0; i < myaArray.length; i++) {
  4. if (myaArray[i] === myString) {
  5.       console.log(true)
  6.     }
  7. };