Question
Consider the following code: let data = [1, 2, 3]; function modifyArray(arr) { arr.push(4); arr = [5, 6]; // Reassigns local 'arr' return arr; } let result = modifyArray(data); console.log(data); console.log(result); What will be the output?
More IT Operating System Questions
- When implementing a circular queue using an array in C, what is the primary advantage over a linear array-based queue?
- What is a characteristic feature of a bipartite graph?
- What is a "collision" in the context of hash tables?
- Which data structure is commonly used for implementing database indexes like B-trees and B+ trees, known for their efficiency in disk-based storage?
- Packet filtering is responsibility of which layer of OSI model?
- What is the main goal of the Dining Philosophers Problem in computer science?
- Which of these techniques is primarily used for word embeddings?
- Given a set of activities with start and finish times: (1,4), (3,5), (0,6), (5,7), (3,9), (5,9), (6,10), (8,11), (8,12), (2,14), (12,16). If you apply the ...
- What is the name of the challenge in email forensics, when criminals used to present an email as someone else’s and in this case the machine will receive b...
- Which OOP principle focuses on showing only essential information and hiding the complex implementation details from the user?
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt