Cengage Angular First Duplicate

by Matthew Vasallo

HTML

<!-- Add AngularJS code to display the list -->
<!-- Add code to mark the first duplicate in the list --->
<div >
<ul id="theList">
    <li></li>
</ul>
</div>

JavaScript

/*
Write an algorithm that will find the first duplicate in a list on the page.
For example we would return 4, for the list above.
*/
var app = angular.module("DuplicateApp", []);

app.controller("DuplicateController", function($scope){
    var numbers = [
        6,
        3,
        1,
        4,
        7,
        4,
        2,
        8,
        9,
        2
    ];
    

    
});