// find the number of duplicate elements in the array (answer 8)
// here are the sketches
<script> a=[1,11,13,121,13,11,11,11,7,9,9] n=a.length cnt=0; for(i=0;i<n-1;i++){ flag=true; for(j=i+1;j<n;j++){ if((a[i]==a[j])&&(i==j)) flag=false; } if(flag){cnt++}; } console.log(cnt) </script> // correct my entries if possible