Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var listOf = 'STRING OF LONG TEXTS';
- var newAr = listOf.toLowerCase().replace('.','').replace('?','').replace(',','').split(' ');
- function renderWords ( data ) {
- var unique = [];
- if ( !Array.isArray(data) || data.length === 0 ){
- return HTML;
- }
- for ( var i=0; i<data.length; i++ ) {
- if ( unique.indexOf( data[i] ) === -1 ){
- unique.push(data[i]);
- console.log(unique);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement