{"ScriptPreparationCode":"var names = [\r\n \u0022Olivia\u0022, \u0022Liam\u0022, \u0022Emma\u0022, \u0022Noah\u0022, \u0022Ava\u0022, \u0022Oliver\u0022, \u0022Sophia\u0022, \u0022Elijah\u0022, \u0022Isabella\u0022, \u0022Lucas\u0022,\r\n \u0022Mia\u0022, \u0022Mason\u0022, \u0022Amelia\u0022, \u0022Logan\u0022, \u0022Harper\u0022, \u0022Ethan\u0022, \u0022Evelyn\u0022, \u0022Aiden\u0022, \u0022Abigail\u0022, \u0022James\u0022,\r\n \u0022Ella\u0022, \u0022Sebastian\u0022, \u0022Avery\u0022, \u0022Jackson\u0022, \u0022Scarlett\u0022, \u0022Alexander\u0022, \u0022Grace\u0022, \u0022Michael\u0022, \u0022Chloe\u0022,\r\n \u0022Benjamin\u0022, \u0022Victoria\u0022, \u0022Jacob\u0022, \u0022Aria\u0022, \u0022Carter\u0022, \u0022Madison\u0022, \u0022William\u0022, \u0022Lily\u0022, \u0022Daniel\u0022,\r\n \u0022Aurora\u0022, \u0022Matthew\u0022, \u0022Zoey\u0022, \u0022Henry\u0022, \u0022Hannah\u0022, \u0022Joseph\u0022, \u0022Stella\u0022, \u0022Samuel\u0022, \u0022Natalie\u0022,\r\n \u0022David\u0022, \u0022Leah\u0022, \u0022Wyatt\u0022\r\n];","TestCases":[{"Name":"Assignmants","Code":"function getPrefix(name) {\r\n if (!name) {return \u0022\u0022; }\r\n\r\n let prefix = \u0022OTHER\u0022; \r\n let mask = \u0022MASK\u0022;\r\n if (name.startsWith(\u0022O\u0022)) {\r\n prefix = \u0022SOMTHING\u0022;\r\n mask = \u0022NO_MASK\u0022;\r\n } else if(name.startsWith(\u0022E\u0022)) {\r\n prefix = \u0022WOOHOO\u0022;\r\n mask = \u0022RANDOM\u0022;\r\n }\r\n\r\n const formatted = \u0060${prefix}-${name}\u0060;\r\n return [formatted, \u0060${mask},${formatted}\u0060];\r\n}\r\nnames.forEach(getPrefix);","IsDeferred":false},{"Name":"creating object","Code":"function getPrefix(name) {\r\n if (!name) {return \u0022\u0022; }\r\n\r\n let config = {prefix: \u0022OTHER\u0022, mask: \u0022MASK\u0022};\r\n if (name.startsWith(\u0022O\u0022)) {\r\n config = {prefix: \u0022SOMETHING\u0022, mask: \u0022NO_MASK\u0022};\r\n } else if(name.startsWith(\u0022E\u0022)) {\r\n config = {prefix: \u0022WOOHOO\u0022, mask: \u0022RANDOM\u0022};\r\n }\r\n\r\n const formatted = \u0060${config.prefix}-${name}\u0060;\r\n return [formatted, \u0060${config.mask},${formatted}\u0060];\r\n}\r\nnames.forEach(getPrefix);","IsDeferred":false},{"Name":"creating object and rewrite","Code":"function getPrefix(name) {\r\n if (!name) {return \u0022\u0022; }\r\n\r\n let config = {prefix: \u0022OTHER\u0022, mask: \u0022MASK\u0022};\r\n if (name.startsWith(\u0022O\u0022)) {\r\n config.prefix = \u0022SOMETHING\u0022;\r\n config.mask = \u0022NO_MASK\u0022;\r\n } else if(name.startsWith(\u0022E\u0022)) {\r\n config.prefix = \u0022WOOHOO\u0022; \r\n config.mask = \u0022RANDOM\u0022;\r\n }\r\n\r\n const formatted = \u0060${config.prefix}-${name}\u0060;\r\n return [formatted, \u0060${config.mask},${formatted}\u0060];\r\n}\r\nnames.forEach(getPrefix);","IsDeferred":false},{"Name":"early return","Code":"function getPrefix(name) {\r\n if (!name) {return \u0022\u0022; }\r\n\r\n if (name.startsWith(\u0022O\u0022)) {\r\n const formatted = \u0060SOMTHING-${name}\u0060;\r\n return [formatted, \u0060NO_MASK,${formatted}\u0060];\r\n } else if(name.startsWith(\u0022E\u0022)) {\r\n const formatted = \u0060WOOHOO-${name}\u0060;\r\n return [formatted, \u0060RANDOM,${formatted}\u0060];\r\n }\r\n\r\n const formatted = \u0060OTHER-${name}\u0060;\r\n return [formatted, \u0060MASK,${formatted}\u0060];\r\n}\r\nnames.forEach(getPrefix);","IsDeferred":false}]}