New paste Repaste Download
// Restructure the array so that:
// - Numbers come first (sorted ascending),
// - strings come after (sorted ascending, case-insensitive),
// Input
let inputArr = [2, "b", 4, "D", 3, "a", "C", "e", 5, 1, 11, 22];
// Expected output
// [1, 2, 3, 4, 5, 11, 22, "a", "b", "C", "D", "e"]
Filename: None. Size: 301b. View raw, , hex, or download this file.

This paste expires on 2026-02-09 02:18:04.326614+00:00. Pasted through web.