Защо Judge ми дава 0/100 на задача 02.Pascal or camel case?
Това е моето решение: https://pastebin.com/mqGFH2vx
Ето условието на задачата:
2.Pascal or Camel Case
An HTML file is given and your task is to write a function that takes two string parameters as an input and transforms the first parameter to the type required by the second parameter.
- The first parameter will be the text that you need to modify depending on the second parameter. The words in it will always be separated by space.
- The second parameter will be either "Camel Case" or "Pascal Case". In case of different input, your output should be "Error!"
When the button is clicked the function should convert the first string to either of the cases. The output should consist of only one word - the string you have modified. Once your output is done, you should set it as HTML to the <span> element. For more information, see the examples below:
Example
Input |
Output |
"this is an example", "Camel Case" |
thisIsAnExample |
"secOND eXamPLE", "Pascal Case" |
SecondExample |
"Invalid Input", "Another Case" |
Error! |
Много благодаря.