{"ScriptPreparationCode":"/* these functions assume that only one element matches, so they do not loop! */\r\n\r\nfunction deleteBySlice (array, element) {\r\n var index = array.indexOf( element );\r\n if (index !== -1) {\r\n \tarray = [...array.slice(0, index), ...array.slice(index \u002B 1)];\r\n }\r\n}\r\n\r\nfunction deleteBySliceConcat (array, element) {\r\n var index = array.indexOf( element );\r\n if (index !== -1) {\r\n \tarray = array.slice(0, index).concat(array.slice(index \u002B 1));\r\n }\r\n}\r\n\r\nfunction deleteByCopyWithin (array, element) {\r\n var index = array.indexOf( element );\r\n if (index !== -1) {\r\n \tarray.copyWithin( index, index \u002B 1 );\r\n array.length--;\r\n }\r\n}\r\n\r\nfunction deleteByFilter (array, element) {\r\n array = array.filter( el =\u003E el !== element );\r\n}","TestCases":[{"Name":"Delete by Slice","Code":"deleteBySlice( array, \u0022uyjxmtqnrzvj7mkyqmtoqolxr\u0022 );\r\ndeleteBySlice( array, \u0022m1c6kzws0iubt8g0zlsug14i\u0022 );\r\ndeleteBySlice( array, \u00224wlivut0n1ht80rs5lyf7ds4i\u0022 );","IsDeferred":false},{"Name":"Delete by copyWithin","Code":"deleteByCopyWithin( array, \u0022uyjxmtqnrzvj7mkyqmtoqolxr\u0022 );\r\ndeleteByCopyWithin( array, \u0022m1c6kzws0iubt8g0zlsug14i\u0022 );\r\ndeleteByCopyWithin( array, \u00224wlivut0n1ht80rs5lyf7ds4i\u0022 );","IsDeferred":false},{"Name":"Delete by Filter","Code":"deleteByFilter( array, \u0022uyjxmtqnrzvj7mkyqmtoqolxr\u0022 );\r\ndeleteByFilter( array, \u0022m1c6kzws0iubt8g0zlsug14i\u0022 );\r\ndeleteByFilter( array, \u00224wlivut0n1ht80rs5lyf7ds4i\u0022 );","IsDeferred":false},{"Name":"Delete by sliceConcat","Code":"deleteBySliceConcat( array, \u0022uyjxmtqnrzvj7mkyqmtoqolxr\u0022 );\r\ndeleteBySliceConcat( array, \u0022m1c6kzws0iubt8g0zlsug14i\u0022 );\r\ndeleteBySliceConcat( array, \u00224wlivut0n1ht80rs5lyf7ds4i\u0022 );","IsDeferred":false}]}