The function below parses a JSON string, but it will throw a `SyntaxError` when the input is invalid — crashing the caller with an unhandled exception.
The bug: JSON.parse throws on malformed input. In a server context, one bad request body can take down your entire request handler.
Your task: fix solve(jsonString, fallback) so that:
fallback (never throws) on any invalid input.solve('{"a":1}', null) // → { a: 1 }
solve('not json', null) // → null (no throw)
solve('', 42) // → 42Sample tests