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,...
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...
// File: useToggle.js import { useState } from "react"; const useToggle = (initialState = false) => { const [visible, setVisibility] =...
_.isEmpty(): Matches undefined, null, false & empty arrays, obj, strings const _ = require('lodash'); console.log( _.isEmpty(undefined), ...
const asyncFunction = async () => "HELLO"; const main = async () => { const value = asyncFunction(); console.log(value === "HELLO" ? "true" :...
snake_case kebab-case camelCase (JS variables, functions) PascalCase (JS Classes) SCREAMING_SNAKE_CASE (JS constants)