Skip to content

Instantly share code, notes, and snippets.

View ninjadev11's full-sized avatar
🏠
Working from home

Talent Dev ninjadev11

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kevin-solution on github.
  • I am bbshark99 (https://keybase.io/bbshark99) on keybase.
  • I have a public key ASChfE9JCGKEMXmyujIGNAesQ_bSSifzAYlOJG0CGrLjWwo

To claim this, I am signing this object:

@ninjadev11
ninjadev11 / js-nan-compare.js
Created December 13, 2020 12:17
JS NaN Compare
const width = NaN;
const height = NaN;
console.log("NaN == NaN => ", width == height);
// NaN == NaN => false
console.log("NaN != NaN => ", width != height);
// NaN != NaN => true
console.log("Object.is(NaN, NaN) => ", Object.is(width, height));
@ninjadev11
ninjadev11 / TreeList.js
Last active December 13, 2020 11:59
Self recursive React Component
import React, { useState } from "react";
import "./style.css";
import TreeListItem from "./TreeListItem";
const STATIC_DATA = [
{ label: "Label A", isOpen: true },
{ label: "Label B", isOpen: true },
{ label: "Label C", isOpen: false },
{ label: "Label D", isOpen: true },