{"ScriptPreparationCode":"var a = [1234,10,-1,-45,240];\r\nvar limit = 400;\r\nvar result = 0;","TestCases":[{"Name":"always max min","Code":"for(var i = 0, len = a.length; i\u003Clen; i\u002B\u002B){\r\n result = Math.min(limit, Math.max(-limit,a[i]));\r\n}","IsDeferred":false},{"Name":"abs check","Code":"for(var i = 0, len = a.length; i\u003Clen; i\u002B\u002B){\r\n if (Math.abs(a[i]) \u003C limit) { continue; }\r\n result = Math.min(limit, Math.max(-limit,a[i]));\r\n}","IsDeferred":false}]}