{"ScriptPreparationCode":null,"TestCases":[{"Name":"JS-Set","Code":"var numJewelsInStones = function (J, S) {\r\n const set = new Set(J.split(\u0022\u0022));\r\n let count = 0;\r\n\r\n for (let i = 0; i \u003C S.length; i\u002B\u002B) {\r\n if (set.has(S[i])) {\r\n count\u002B\u002B;\r\n }\r\n }\r\n\r\n return count;\r\n};\r\n\r\nnumJewelsInStones(\u0027aA\u0027, \u0027AaaaAAaaaaAaAAAAaaaaaAabbsdfdffojeworwejoijovweojoweijoewjfwejfowejfowejofjeworjwejtweojweojfweojfwepfpoewjfp\u0027)","IsDeferred":false},{"Name":"JS-Array","Code":"var numJewelsInStones = function(J, S) {\r\n if (!J || !S) return 0;\r\n \r\n let count = 0;\r\n for (const c of S) {\r\n if (J.includes(c)) count\u002B\u002B;\r\n }\r\n \r\n return count;\r\n};\r\n\r\nnumJewelsInStones(\u0027aA\u0027, \u0027AaaaAAaaaaAaAAAAaaaaaAabbsdfdffojeworwejoijovweojoweijoewjfwejfowejfowejofjeworjwejtweojweojfweojfwepfpoewjfp\u0027)","IsDeferred":false}]}