# Работы со строками - Получить путь баз файла ```js fullPath = "/home/user/dir/report.json"; fullPath.substring(0,fullPath.lastIndexOf('/') + 1); // /home/user/dir/ ``` - Получить только файл из пусти ```js fullPath = "/home/user/dir/report.json"; fullPath.substring(fullPath.lastIndexOf('/') + 1); // report.json ```