The selected() method, called without any parameters, will return all selected items' index of the DropDown widget.
The selected(index, bool) method is used to select or unselect(depending on second boolean parameter) particular item on the passed index position.

<select id="ddl"></select>

<script type="text/javascript">
    $(function () {
            dataSource: {
                data: countries
            enabled: false,
            textTemplate: "{name}",
            valueTemplate: "{code}"

        $("#ddl").swidget().selected(); // returns empty array

        $("#ddl").swidget().selected(0, true) // selects the first item

        $("#ddl").swidget().selected(); // returns array with one element - the selected item's index - 0