const str = "Please give Rs1000";
str[3] = 'Q';
console.log(str); // not changed as string is immutable
str.replace('s', 'Q');
console.log(str); // not changed as string is immutable
/*
Output:
Please give Rs1000
Please give Rs1000
*/
const str = "Please give Rs1000";
str[3] = 'Q';
console.log(str); // not changed as string is immutable
str.replace('s', 'Q');
console.log(str); // not changed as string is immutable
/*
Output:
Please give Rs1000
Please give Rs1000
*/