Skip to content
Top Bar

Pravin Varma

Web Developer | Photography | Graphic Design | Digital artwork | Photo editing

  • My Digital Artwork
  • Photography
  • View My Profile
Javascript

Rarely used/ known secrets of Javascript numbers and strings

Feb 27, 2023 Pravin Varma Comments Off on Rarely used/ known secrets of Javascript numbers and strings

let num = 1; console.log(1e1); // 10 console.log(2e1); //20 console.log(2e-1); //0.2 console.log(2e-2); //0.02 console.log(2e-3); //0.002 console.log((123456).toString()); //123456 console.log((123456).toString()); //123456 let num2 = 255; console.log(num2.toString(16)); //ff

Javascript

Using Karma plugin in IntelliJ IDEA to run individual test files

Dec 15, 2022 Pravin Varma Comments Off on Using Karma plugin in IntelliJ IDEA to run individual test files

If you are using IntelliJ IDEA and working on test cases and if you want to run test cases in a particular file or a

Javascript

useContext hook

Jul 28, 2022 Pravin Varma Comments Off on useContext hook

Most of the blogs provide code that has parent and child component placed in the same file. The context is available to both the component.

Javascript

React useMemo example with explanation

Jul 8, 2021 Pravin Varma Comments Off on React useMemo example with explanation

import React,{useMemo,useState} from “react”;import “./style.css”;export default function App() { const [state, setState] = useState(0); for(let i=1;i<10;i++){ let a=1; let b = 1; console.log(useMemo(()=> {console.log(‘invoked’);return a+b},[a,b]))

Javascript

Mapping useEffect with lifecycle hook methods in React

Jul 5, 2021 Pravin Varma Comments Off on Mapping useEffect with lifecycle hook methods in React

componentDidMount useEffect(() => { // will run on every render }); useEffect(() => { // will run on first render },[]); componentDidUpdate useEffect(() => {

Javascript

Prevent child from re-rendering in React using React.memo

Jun 19, 2021 Pravin Varma Comments Off on Prevent child from re-rendering in React using React.memo

This is the parent component import React,{useEffect, useState} from ‘react’; import ‘./style.css’; import Child1 from ‘./child1’; export default function App() { const [change, setChange] =

Javascript

Rarely used/ known secrets of Javascript numbers and strings

Feb 27, 2023 Pravin Varma 0
Javascript

Using Karma plugin in IntelliJ IDEA to run individual test files

Dec 15, 2022 Pravin Varma 0
Javascript

useContext hook

Jul 28, 2022 Pravin Varma 0
Javascript

React useMemo example with explanation

Jul 8, 2021 Pravin Varma 0
Travel to Bali from Mumbai
Javascript

Rarely used/ known secrets of Javascript numbers and strings

Feb 27, 2023 Pravin Varma

let num = 1; console.log(1e1); // 10 console.log(2e1); //20 console.log(2e-1); //0.2 console.log(2e-2); //0.02 console.log(2e-3); //0.002

Javascript

Using Karma plugin in IntelliJ IDEA to run individual test files

Dec 15, 2022 Pravin Varma

If you are using IntelliJ IDEA and working on test cases and if you want

pravindvarma@gmail.com
Javascript

useContext hook

Jul 28, 2022 Pravin Varma

Most of the blogs provide code that has parent and child component placed in the

useMemo React
Javascript

React useMemo example with explanation

Jul 8, 2021 Pravin Varma

import React,{useMemo,useState} from “react”;import “./style.css”;export default function App() { const [state, setState] = useState(0); for(let

hooks react
Javascript

Mapping useEffect with lifecycle hook methods in React

Jul 5, 2021 Pravin Varma

componentDidMount useEffect(() => { // will run on every render }); useEffect(() => { //

Javascript

Prevent child from re-rendering in React using React.memo

Jun 19, 2021 Pravin Varma

This is the parent component import React,{useEffect, useState} from ‘react’; import ‘./style.css’; import Child1 from

method chaining
Javascript

Chaining of methods for Javascript object

Jun 11, 2021 Pravin Varma

function Student() { this.obj = {}; this.setName = function(name) { this.obj.name = name; return this;

Javascript

A tricky useEffect dependency

Jun 11, 2021 Pravin Varma

The following code returns 1. It is tricky but should be eye opener. export default

Javascript

Find duplicate element in an array in Javascript

Jul 14, 2020 Pravin Varma
Javascript

Override TextField and Dialog box content for Material UI

Jun 6, 2019 Pravin Varma

const theme = createMuiTheme({ overrides: { MuiOutlinedInput: { root:{ padding:’10px’, height:’50px’, } }, MuiDialogContent: {

Posts navigation

Page 1 Page 2 Page 3 NextNext page

Pages

  • My Digital Artwork
  • Photography
  • View My Profile

Blogroll

  • Chrome extension
  • Flash Game

Archives

  • February 2023
  • December 2022
  • July 2022
  • July 2021
  • June 2021
  • July 2020
  • June 2019
  • February 2019
  • January 2018
  • September 2017
  • July 2016
  • March 2016
Travel to Bali from Mumbai
Javascript

Rarely used/ known secrets of Javascript numbers and strings

Feb 27, 2023 Pravin Varma 0
Javascript

Using Karma plugin in IntelliJ IDEA to run individual test files

Dec 15, 2022 Pravin Varma 0
pravindvarma@gmail.com
Javascript

useContext hook

Jul 28, 2022 Pravin Varma 0
useMemo React
Javascript

React useMemo example with explanation

Jul 8, 2021 Pravin Varma 0
hooks react
Javascript

Mapping useEffect with lifecycle hook methods in React

Jul 5, 2021 Pravin Varma 0
Javascript

Prevent child from re-rendering in React using React.memo

Jun 19, 2021 Pravin Varma 0
Copyright © 2023 Bosa Blog. Powered by Bosa Themes