<prompt> Ngola tšebetso ea JavaScript e nkang khoele ebe e khutlisa ntho e nang le tlhaku e ngoe le e ngoe ea khoele e le senotlolo, le makhetlo a makhetlo a hlahang khoeleng e le boleng.nan  <response>: Instruction in English: Write a JavaScript function that takes in a string and returns an object with each character of the string as a key, and the number of times that character appears in the string as the value. . Response in English: Here is a function that takes in a string and returns an object with the counts of each character in the string:javascriptfunction countCharsstr let result ; for let i 0; i str.length; i let char stri; if resultchar resultchar; else resultchar 1; return result;Heres an example of how you can use the function:javascriptlet string hello, world.;let charCount countCharsstring;console.logcharCount; returns : 1, ,: 1, .: 1, e: 1, h: 1, l: 3, o: 2, r: 1, w: 1 The function works by initializing an empty object. It then iterates through each character in the string using a for loop. For each character, the function checks if the character is already a key in the object. If it is, the value for that key is incremented. If the character is not yet a key in the object, the key is added with a value of 1. After the for loop completes, the function returns the object containing the counts of each character in the string. . Response in Sesotho: Mona ke tsebetso e nkang khoele ebe e khutlisa ntho e nang le lipalo tsa tlhaku e ngoe le e ngoe khoeleng: javascript function countCharsstr let result ; bakeng sa tlohela ke 0; ke str.length; i let char stri; haeba sephethochar sephethochar; e ngoe sephethochar 1; sephetho sa ho khutlisa; Mona ke mohlala oa kamoo o ka sebelisang tšebetso: javascript let string hello, world.; let charCount countCharskhoele; console.logcharCount; e khutlisa : 1, ,: 1, .: 1, e: 1, h: 1, l: 3, o: 2, r: 1, w: 1 Mosebetsi e sebetsa ka ho qala ntho e se nang letho. Ebe e pheta-pheta ka tlhaku e ngoe le e ngoe khoeleng e sebelisa for lupu. Bakeng sa tlhaku e ngoe le e ngoe, tšebetso e hlahloba hore na sebapali e se e le senotlolo sa ntho. Haeba ho joalo, boleng ba senotlolo seo boa eketseha. Haeba tlhaku e e-so be senotlolo sa ntho, senotlolo se eketsoa ka boleng ba 1. Kamora hore loop e phethe, tšebetso e khutlisa ntho e nang le lipalo tsa tlhaku ka ngoe khoeleng. 