Home »
MCQs
Electron.js Multiple-Choice Questions (MCQs)
Electron is a free and open-source software framework developed and maintained by OpenJS Foundation. The framework is designed to create desktop applications using web technologies.
Electron.js MCQs: This section contains multiple-choice questions and answers on the various topics of Electron.js. Practice these MCQs to test and enhance your skills on Electron.js.
List of Electron.js MCQs
1. Can the electron framework be used to construct both mobile and desktop applications?
- Yes
- No
Answer: B) No
Explanation:
No, Electron is intended for the development of cross-platform desktop apps rather than mobile applications.
Discuss this Question
2. What language does the electron framework employ?
- Python
- Java
- JavaScript
Answer: C) JavaScript
Explanation:
The major programming language in Electron is JavaScript.
Discuss this Question
3. Is the Electron framework open-source?
- Yes
- No
Answer: A) Yes
Explanation:
Yes, the electron framework is an open-source framework.
Discuss this Question
4. What company created the electron framework?
- IBM
- Apache
- Microsoft
- GitHub
Answer: D) GitHub
Explanation:
GitHub created the Electron open-source framework.
Discuss this Question
5. Which of the following is the product of the Electron framework?
- Visual studio
- Discord
- Sublime
- GitHub Desktop
- All of the above
Answer: E) All of the above
Explanation:
Following are the products of the electron framework:
- Visual studio
- Discord
- Sublime
- GitHub Desktop
Discuss this Question
6. In Electron, the ____ is in charge of producing the main window and handling the application life cycle.
- Main process
- Renderer process
- Inter process
Answer: A) Main process
Explanation:
In Electron, the main process is in charge of producing the main window and handling the application life cycle.
Discuss this Question
7. A ____ process is in charge of rendering the UI of an Electron application.
- Main process
- Renderer process
- Inter process
Answer: B) Renderer process
Explanation:
A renderer process is in charge of rendering the UI of an Electron application.
Discuss this Question
8. Electron uses ____ to communicate between the main process and the renderer processes.
- TPC
- UDP
- IPC
Answer: C) IPC
Explanation:
Electron uses IPC to communicate between the main process and the renderer processes.
Discuss this Question
9. If the renderer process crashes, will it affect the rest of the application?
- Yes
- No
Answer: B) No
Explanation:
If a renderer process fails, the remainder of the program will not be affected.
Discuss this Question
10. To quit the application ____ method is used.
- App.end()
- App.close()
- App.quit()
Answer: C) App.quit()
Explanation:
To quit the application app.quit() method is used.
Discuss this Question
11. ____ function reads a file's contents.
- fs.fileread(filePath, options, callback)
- fs.readFile(filePath, options, callback)
- fs.read(filePath, options, callback)
Answer: B) fs.readFile(filePath, options, callback)
Explanation:
fs.readFile(filePath, options, callback), the function reads a file's contents.
Discuss this Question
12. In the electron framework, fs stands for?
- File system
- Folder scheme
- File sync
Answer: A) File system
Explanation:
Fs stands for the file system.
Discuss this Question
13. The gzip format is used to compress and decompress data in ____ library.
- Zlib
- Crypto
- Path
- Fs
Answer: A) Zlib
Explanation:
The gzip format is used to compress and decompress data in the zlib library.
Discuss this Question
14. ____ library allows you to access the file system to read and write files, create directories, and do other file operations.
- Zlib
- Http
- Path
- fs
Answer: D) fs
Explanation:
fs library allows you to access the file system to read and write files, create directories, and do other file operations.
Discuss this Question
15. Which of the following library contains routines for working with file and directory paths?
- Zlib
- Http
- Path
- fs
Answer: C) Path
Explanation:
The path library contains routines for working with file and directory paths.
Discuss this Question
16. ____-method builds a new network server that can accept connections.
- Net.startserver
- Net.createServer
- Net.Newserver
- Net.addserver
Answer: B) Net.createServer
Explanation:
net.createServer method builds a new network server that can accept connections.
Discuss this Question
17. Which of the following method begins listening for incoming connections on the port and host supplied?
- Server.listen
- Listen
- Client.listen
Answer: A) Server.listen
Explanation:
server.listen method begins listening for incoming connections on the port and host supplied.
Discuss this Question
18. IPC stands for ____.
- International process communication
- Inter process communication
- Inter procedure communication
Answer: B) Inter process communication
Explanation:
IPC stands for inter process communication.
Discuss this Question
19. Which of the following function delivers an IPC message to the main process from a renderer process?
- ipcRenderer.on
- Renderer.ipc
- ipcMain.send
- IpcRenderer.send
Answer: D) IpcRenderer.send
Explanation:
ipcRenderer.send function delivers an IPC message to the main process from a renderer process.
Discuss this Question
20. Which of the following function transmits an IPC message from one renderer process to another?
- ipcRenderer.on
- event.sender.send
- ipcMain.send
- IpcRenderer.send
Answer: B) event.sender.send
Explanation:
function transmits an IPC message from one renderer process to another.
Discuss this Question
21. Which of the following method adds an item to the menu's end?
- Menu.append
- Menu.end
- Menu.append.end
- Menu.end.append
Answer: A) Menu.append
Explanation:
menu.append method adds an item to the menu's end.
Discuss this Question
22. Which of the following method inserts an item into the menu at a given location?
- Menu.add
- Menu.in
- Menu.insert
Answer: C) Menu.insert
Explanation:
menu.insert method inserts an item into the menu at a given location.
Discuss this Question
23. Electron's ____ module allows you to generate a system tray icon for your Electron apps.
- Generate
- Terminal
- Tray
- Panel
Answer: C) Tray
Explanation:
Electron's Tray module allows you to generate a system tray icon for your Electron apps.
Discuss this Question
24. Which of the following creates a new tray object?
- New tray
- Start tray
- Fresh tray
- Begin tray
Answer: A) New tray
Explanation:
new tray constructor creates a new tray object.
Discuss this Question
25. ____ constructor generates a new notification object.
- New notify
- New notification
- New alert
Answer: B) New notification
Explanation:
New notification constructor generates a new notification object.
Discuss this Question
26. ____ function returns the audio and video streams for the chosen source.
- desktopCapturer.getUserMedia
- desktopCapturer.getSources
- desktopCapturer.getmedia
- desktopCapturer.getuser
Answer: A) desktopCapturer.getUserMedia
Explanation:
desktopCapturer.getUserMedia function returns the audio and video streams for the chosen source.
Discuss this Question
27. Which of the following command launches the Electron program in the current directory?
- Start
- Run
- Electron
- Node
Answer: C) Electron
Explanation:
electron command launches the Electron program in the current directory.
Discuss this Question
28. Electron's ____ module allows Electron apps to collect audio and video streams from the desktop.
- AudioCapturer
- desktopCapturer
- AudVidCapturer
Answer: B) desktopCapturer
Explanation:
Electron's desktopCapturer module allows Electron apps to collect audio and video streams from the desktop.
Discuss this Question
29. The URL of the web page to be shown in the WebView tag is specified by ____ attribute.
- Preloader
- Url
- path
- src
Answer: D) src
Explanation:
The URL of the web page to be shown in the WebView tag is specified by the src attribute.
Discuss this Question
30. Electron's ____ tag allows you to incorporate web pages into your Electron application.
- Head
- Body
- Widget
- WebView
Answer: D) WebView
Explanation:
Electron's WebView tag allows you to incorporate web pages into your Electron application.
Discuss this Question
31. Electron is based on the open-source web browser project ____.
- Chromium
- GitHub
- Google Chrome
- Mozilla Firefox
Answer: A) Chromium
Explanation:
Electron is based on the open-source web browser project Chromium.
Discuss this Question
32. ____ shortcut launches the Electron application's DevTools window.
- Ctrl + Shift + I
- Ctrl + Shift + T
- Ctrl + Shift + R
Answer: A) Ctrl + Shift + I
Explanation:
Ctrl + Shift + I shortcut launches the Electron application's DevTools window.
Discuss this Question
33. In an Electron application, the ____ class is in charge of producing new windows.
- Browser menu
- Browser widget
- BrowserWindow
Answer: C) BrowserWindow
Explanation:
In an Electron application, the BrowserWindow class is in charge of producing new windows.
Discuss this Question
34. ____ function establishes a new network connection to a given host and port.
- net.create
- net.createConnection
- createConnection
Answer: B) net.createConnection
Explanation:
net.createConnection function establishes a new network connection to a given host and port.
Discuss this Question
35. ____ method terminates the notification.
- Notification.remove
- Notification.end
- Notification.close
Answer: C) Notification.close
Explanation:
notification.close method, terminates the notification.
Discuss this Question
36. ____ property specifies whether the WebView tag will be able to use Node.js APIs.
- nodeintegrate
- Nodeintegration
- integrateNode
Answer: B) Nodeintegration
Explanation:
nodeintegration property specifies whether the WebView tag will be able to use Node.js APIs.
Discuss this Question
37. ____ property specifies the location of a JavaScript file that will be run within the context of the WebView element.
- Preloader
- Url
- path
- src
Answer: A) Preloader
Explanation:
Preloader property specifies the location of a JavaScript file that will be run within the context of the WebView element.
Discuss this Question
38. How many types of environment variables are encoded in an electron?
- 2
- 3
- 4
- 5
Answer: A) 2
Explanation:
Two types of environment variables are encoded in electron: production variable and development variable.
Discuss this Question
39. ____ shortcut reloads the Electron application's current window.
- CTRL + K
- CTRL + Q
- CTRL + S
- CTRL + R
Answer: D) CTRL + R
Explanation:
CTRL+ R shortcut reloads the Electron application's current window.
Discuss this Question
40. The Electron application is closed when you use ____ shortcut.
- CTRL + K
- CTRL + Q
- CTRL + S
- CTRL + R
Answer: B) CTRL + Q
Explanation:
The Electron application is closed when you use the CTRL+ Q shortcut.
Discuss this Question