• Mar 11, 2021 •C S
0 likes • 3 views
import { configureStore } from "@reduxjs/toolkit"; import { combineReducers } from "redux"; import profile from "./profile"; import auth from "./auth"; import alert from "./alert"; const reducer = combineReducers({ profile, auth, alert, }); const store = configureStore({ reducer }); export default store;
• Mar 9, 2021 •LeifMessinger
0 likes • 1 view
alert("bruh")
• Nov 19, 2022 •CodeCatch
const reverse = str => str.split('').reverse().join(''); reverse('hello world'); // Result: 'dlrow olleh'
• Nov 18, 2022 •AustinLeath
0 likes • 0 views
// Get the text that the user has selected const getSelectedText = () => window.getSelection().toString(); getSelectedText();
• Jan 5, 2026 •C S
0 likes • 9 views
<div className="md:self-start sticky top-16 bg-background px-4 mt-1 sm:px-6 md:pt-4 lg:pl-8 lg:pr-4"> <ScrollArea className="whitespace-nowrap"> <div className="w-max flex md:flex-col gap-1 bg-transparent text-muted-foreground pb-2"> {menuData.map((section) => ( <Button key={section.title} onClick={() => handleScrollToSection(section.title)} variant="ghost" size="sm" className={cn( 'w-auto md:w-full hover:cursor-pointer relative md:justify-end', activeSection === section.title ? cn( 'text-foreground after:absolute after:bottom-[-2px] after:bottom-0 after:w-full after:h-[2px] after:bg-primary', 'md:after:right-[-2px] md:after:top-0 md:after:h-full md:after:w-[2px]', ) : '', )} > {section.title} </Button> ))} </div> <ScrollBar orientation="horizontal" /> </ScrollArea> </div>
• Feb 6, 2021 •LeifMessinger
0 likes • 2 views
class SequentialQueue{ //if you want it to go backwards, too bad next(){ return this.i++; } constructor(start = 0){ this.i = start; } } const que = new SequentialQueue(0); for(let i = 0; i < 10; i++){ console.log(que.next()); }