TutorialKart
index.html
►
Run
Reset
<!DOCTYPE html> <html lang="en"> <body> <pre id="output"></pre> <script> //create set from array var arr = [1, 2, 3, 4] var set1 = new Set(arr); var displayOutput = ''; set1.forEach (function(element) { displayOutput += element + '\n'; }); document.getElementById('output').innerHTML += displayOutput; </script> </body> </html>