Check Form is new or not

How to check a form is new or not using code ?

Hello @SUKUMARAN_BV,

In Javascript :

if (frm.is_new()) {
}

In Python:

if doc.is_new():