concept window title in category electron

appears as: window title
Electron in Action

This is an excerpt from Manning's book Electron in Action.

Listing 6.3. Updating the window title based on the current file: ./app/renderer.js
const path = require('path');

const updateUserInterface = () => {
  let title = 'Fire Sale';
  if (filePath) { title = `${path.basename(filePath)} - ${title}`; }   #1
  currentWindow.setTitle(title);                                       #2
};