Javascript - Variables from html div : I have this simple div

<!-- begin snippet: js hide: false -->

<!-- language: lang-html -->

    <div id='names'>
        name1[John]
        name2[Blake]
        name3[Sven]
        name4[Ellis]
    </div>



<!-- end snippet -->


And I want to return this variabels using javascript

<!-- begin snippet: js hide: false -->

<!-- language: lang-js -->

    var name1 = "John";
    var name2 = "Blake";
    var name3 = "Sven";
    var name4 = "Ellis";

<!-- end snippet -->

Any help please ..
<br>Thanks!