Generation

generate functionSat, 20 May 2023

Output String text 'Test' , And, replace the 4th character of the text 'Test' with '1'.

Script //create string variable var string = 'Test'; //get 4th character of string var char = string.charAt(3); //replace 4th character with 1 char = '1'; //print string with replaced character console.log(string);

Want to kickstart your project?Use the new AI Studio to create your code