dump imports search path - (for of)

主要範例

原始碼

#!/usr/bin/gjs

let list = imports.searchPath;
let key = 0;
for (let item of list) {
    print('Key: ', key);
    print('Item: ', item);
    print('List: ', list);
    print('\n===============\n');
    key++;
}

function 版

原始碼

#!/usr/bin/gjs

function dump_format_imports_search_path(list) {
    let key = 0;
    for (let item of list) {
        print('Key: ', key);
        print('Item: ', item);
        print('List: ', list);
        print('\n===============\n');
        key++;
    }
}

function dump_imports_search_path() {
    dump_format_imports_search_path(imports.searchPath);
}


dump_imports_search_path();