Judge: Valid JavaScript with correct morse table, proper use of meow/MEOW substitution, and cat emoji word separator. Function name is meowMorse as required. Two test cases provided (SOS and HELLO WORLD) with inline explanation. Clean modern JS style using map/filter/join chains. Minor gap: doesn't handle edge cases like empty strings or special characters gracefully.
Write a JavaScript function called `meowMorse` that converts a string to morse code, but uses "meow" for dots and "MEOW" for dashes. Spaces between words should be represented by "πΊ". Include at least two test cases.
9 models responded
Judge: The function structure is clean and uses modern JS (map/filter/join). Morse code mappings look correct. The replacement approach (dots then dashes) has a subtle bug: replacing '.' first with 'meow' then '-' with 'MEOW' works because the replacements don't contain the other character. However, the listed expected outputs for test cases are incorrect -- 'CAT' shows emoji separators between letters of the same word, and 'HELLO WORLD' output is truncated/wrong. The function logic is likely correct but the test case outputs are wrong, undermining confidence.
Judge: Correct morse code mapping, proper function structure, uses 'meow'/'MEOW' substitution approach. Response truncated before completion so we can't verify test cases or full word-spacing logic. The visible code is clean modern JS with a comprehensive morse table. Truncation means we can't confirm test cases are present, which is a hard constraint.
Judge: Function structure is correct and idiomatic JS. The morse code mapping is standard. However, there's a significant bug: replacing dots and dashes with 'meow'/'MEOW' without separators means '.-' becomes 'meowMEOW' -- the individual elements run together and can't be decoded. Response is truncated so test cases are incomplete, though it appears to include at least 2.
Judge: The morse code mappings shown are correct and the approach is reasonable, but the response is truncated mid-object literal. Test cases are not visible, and the function body likely wasn't completed. Can only grade what's delivered.
Judge: Truncated mid-function β the morse dictionary is complete and correct, but the conversion logic and test cases are cut off. Can't verify correctness, meow/MEOW substitution, or test cases. The visible portion shows clean modern JS style with a complete morse dictionary.
Judge: The response is truncated mid-dictionary, so no test cases are visible and the function is incomplete β failing the hard constraint of including at least 2 test cases. The morse dictionary contains formatting errors (spaces in entries like 'MEOW- MEOW-meow' for G) and uses hyphens as separators within letters which could conflict with morse separation. The approach is reasonable but execution is broken.
Judge: Response is truncated mid-code β the morseCodeMap object is cut off partway through letter I. No complete function, no test cases visible. The approach described (replacing dots with 'meow' and dashes with 'MEOW') is correct conceptually but the code is incomplete and cannot run.
Judge: Fundamentally broken. The morse code dictionary has 'MEOW' for A but standard dots/dashes for all other letters -- it never converts dots to 'meow' or dashes to 'MEOW' as required. The function outputs standard morse with emoji separators, completely missing the core requirement. Two test cases are present but they'd produce wrong output.