{"ScriptPreparationCode":null,"TestCases":[{"Name":"Keys","Code":"const BREAKPOINTS = {\r\n desktop: 1024,\r\n desktopMedium: 1280,\r\n desktopWide: 1600,\r\n\r\n mobile: 320,\r\n mobileMedium: 375,\r\n mobileWide: 425,\r\n\r\n tablet: 768,\r\n}\r\n\r\nconst size = 1100\r\nconst keys = Object.keys(BREAKPOINTS)\r\n\r\nkeys.reduce((previous, current) =\u003E {\r\n const currentWidth = BREAKPOINTS[current]\r\n const previousWidth = BREAKPOINTS[previous]\r\n\r\n return Math.abs(size - previousWidth) \u003C Math.abs(size - currentWidth) ? previous : current\r\n}, \u0027desktop\u0027)","IsDeferred":false},{"Name":"Entries","Code":"const BREAKPOINTS = {\r\n desktop: 1024,\r\n desktopMedium: 1280,\r\n desktopWide: 1600,\r\n\r\n mobile: 320,\r\n mobileMedium: 375,\r\n mobileWide: 425,\r\n\r\n tablet: 768,\r\n}\r\n\r\nconst size = 1100\r\nconst entries = Object.entries(BREAKPOINTS)\r\n\r\nentries.sort(([, widthA], [_, widthB]) =\u003E {\r\n return Math.abs(widthA - size) - Math.abs(widthB - size)\r\n})[0][0]","IsDeferred":false}]}