Popular case types in programming
- snake_case
- kebab-case
- camelCase (JS variables, functions)
- PascalCase (JS Classes)
- SCREAMING_SNAKE_CASE (JS constants)
Search for a command to run...
No comments yet. Be the first to comment.
Hi, I am Mehul, Senior Frontend Engineer at Toddle. I make side projects in my free time & do all the development, logo design, video editing, UI, marketing, etc all by myself. Some of my solo projects: Array Builder - A free tool to visualize the o...
A few days back while I was working I wrote a long block of code that made use of map, reduce & filter. Without testing I finished the code assuming it's gonna work but it broke. I had to console.log every operation to debug it. It was a minor issue,...

// File: useToggle.js import { useState } from "react"; const useToggle = (initialState = false) => { const [visible, setVisibility] = useState(initialState); const toggle = () => setVisibility((prev) => !prev); const setToggleStatus = (valu...
_.isEmpty(): Matches undefined, null, false & empty arrays, obj, strings const _ = require('lodash'); console.log( _.isEmpty(undefined), _.isEmpty(null), _.isEmpty(false) _.isEmpty([]), _.isEmpty({}), _.isEmpty(""), ); // true x 6
const asyncFunction = async () => "HELLO"; const main = async () => { const value = asyncFunction(); console.log(value === "HELLO" ? "true" : "false"); }; main(); Output: false asyncFunction() returns a promise not the resolved value.