Question
Which ES6 feature allows for function parameters to have
default values if no value is provided during a function call?Solution
Default parameters in ES6 enable a function to use a default value for a parameter if no argument is passed. This enhances code readability and reduces the need for conditional checks. Example: function greet(name = "Guest") { Â return `Hello, ${name}!`; } console.log(greet());Â Â Â Â Â Â // Outputs: Hello, Guest! console.log(greet("Alice"));Â Â // Outputs: Hello, Alice! This feature is especially useful in scenarios where optional parameters are involved, as it simplifies function declarations. ________________________________________ Why Other Options Are Incorrect: 1. Arrow functions: Arrow functions are a concise syntax for writing functions but do not relate to parameter defaults. 2. Template literals: Template literals allow embedding expressions in strings using backticks, unrelated to parameter handling. 3. Rest parameters: Rest parameters gather multiple arguments into an array, enabling flexible argument handling but do not assign defaults. 4. Destructuring assignment: Destructuring allows unpacking values from arrays or objects but does not deal with function defaults.
Which of the following operating systems is an open-source?
In which of the following network topology, all devices on a network are connected to a single continuous cable?
Storage device found inside the computer is
In the field of computer/IT in open system interconnection on models, there are ____ layers.
Which layer of the OSI model provides the interface between the user and the network?
The largest unit of storage is
The most suitable type of network that phone lines would us is
_________ can be used to store a large number of files in a small amount of storage space. Â
Which of the following is not a type of operating system?
In an operating system, which memory management technique swaps out entire processes to free up memory space?