{"ScriptPreparationCode":"/* these functions assume that only one element matches, so they do not loop! */\r\n\r\nfunction deleteBySplice (array, element) {\r\n var index = array.indexOf( element );\r\n var temp = array.slice();\r\n if (index !== -1) {\r\n \ttemp.splice( index, 1 );\r\n }\r\n}\r\n\r\nfunction deleteBySpread (array, element) {\r\n var index = array.indexOf( element );\r\n var temp;\r\n if (index !== -1) {\r\n \ttemp = [...array.slice(0, index), ...array.slice(index \u002B 1)];\r\n }\r\n}\r\n","TestCases":[{"Name":"Delete by Splice","Code":"deleteBySplice( array, \u0022uyjxmtqnrzvj7mkyqmtoqolxr\u0022 );\r\ndeleteBySplice( array, \u0022m1c6kzws0iubt8g0zlsug14i\u0022 );\r\ndeleteBySplice( array, \u00224wlivut0n1ht80rs5lyf7ds4i\u0022 );","IsDeferred":false},{"Name":"Delete by Spread","Code":"deleteBySpread( array, \u0022uyjxmtqnrzvj7mkyqmtoqolxr\u0022 );\r\ndeleteBySpread( array, \u0022m1c6kzws0iubt8g0zlsug14i\u0022 );\r\ndeleteBySpread( array, \u00224wlivut0n1ht80rs5lyf7ds4i\u0022 );","IsDeferred":false}]}