- A.python
- B.pe
- C.py
- D.pi
Time Taken:
Correct Answer:
Wrong Answer:
Percentage: %
Python input() function is used to take user input. By default, it returns the user input in form of a text string.
color = input("What color is rose?: ")
print("Rose is", color)
Output
What color is rose?: red Rose is red
In JavaScript, only arrays and objects are mutable, which means that their values can be modified after they are created.
Primitive values such as numbers, strings, and booleans are immutable, which means that their values cannot be changed once they are created.
For example:
let a = [1, 2, 3];
a.push(4); // okay, a is now [1, 2, 3, 4]
let b = { x: 10, y: 20 };
b.x = 30; // okay, b is now { x: 30, y: 20 }
In this example, the a array and the b object are both mutable, and their values can be modified by adding or modifying elements in the array or properties in the object.