<div style="display:none">
Internationalised Programming Challenge 1
अंतर्राष्ट्रीय प्रोग्रामिंग चैलेंज १
This code has an intentional bug.
Your challenge is:-
1️⃣ identify the bug
2️⃣ explain the bug and what causes it
3️⃣ fix the code to correctly work with my name André.
4️⃣ Most people write my name incorrectly as Andre instead of the correct form André. There are many people and place names that use diacritics. Here is a small selection: Tomáš, Saulė, Nesbø, Chloë, Håfström, Wałęsa, Erdoğan, Łódź, Piñon Hills. Most people will write these names without the diacritics. I think it good manners to write people names correctly which means writing them with the diacritics. Now letʼs imagine we have a file, file① which consists of thousands of names and addresses. Many of these people and place names in file① are written incorrectly. We have another file, file② that has a list of names written correctly. We can thus replace incorrectly written names in file① with correctly written names from file②. Modify my code to produce a general purpose function that will correct file①, given this scenario.I am not expecting you to write code for accessing files or arrays. I am only interested in function rep() code. The general purpose function code will be of the form:
function rep(parameter1,parameter2)
parameter1 will be a single name + address record, where name may or may not be correctly written. Remember, both place names as well as person names can have diacritics.
parameter2 will be a single correctly written name.
I had originally intended to show my solutions in this jsfiddle but I have now decided to leave it as an open challenge to the world. I will not give my solutions to anyone but I will guide people to solutions with a series of clues and hints, one clue at a time. So, if you cannot solve this challenge, email me or if you do not know my email address, tweet me @andreschappo or contact me on Weibo 微博 @schappo for a clue. If you...