Counting the occurrences / frequency of array elements
Counting the occurrences / frequency of array elements
Counting the occurrences / frequency of array elements
I’m not writing the code for you but here’s the gist: Create a variable that tells whether or not you’ve seen your number before. Go through your array and the first time you see it set that variable to remember that you’ve seen it. The next time you see it check the variable you created … Read more
.s-list ul li{ list-style: none; padding-left: 10px; } https://jsfiddle.net/ctmeaqg2/1/ Padding on li works fine. Check!
Create element: var element = document.createElement(‘table’); Adding attribute: element.setAttribute( “id”, “table1” );