Skip to content

Conversation

@Akanksha13-dev
Copy link
Owner

No description provided.


enum Role{SuperAdmin,Admin,Subscriber};
class model1{
ID:number;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable casing should be camel case

@@ -0,0 +1,158 @@

enum Role{SuperAdmin,Admin,Subscriber};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate file for enum

@@ -0,0 +1,158 @@

enum Role{SuperAdmin,Admin,Subscriber};
class model1{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate file

},
body: JSON.stringify(object)
})
let data = await response.json()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Return directly no need to store in a var

},
body: JSON.stringify(object)
})
let data = await response.json()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

document.getElementById("saveUpdate"+no).style.visibility="visible";
document.getElementById("cancelUpdate"+no).style.visibility="visible";

var Id=document.getElementById("ID"+no);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use const over var, if reassignment is not being done

document.getElementById("saveUpdate"+no).style.visibility="visible";
document.getElementById("cancelUpdate"+no).style.visibility="visible";

var Id=document.getElementById("ID"+no);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Var should not be used google about const and let

},
"keywords": [],
"author": "",
"license": "ISC"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing dependencies out here save deps with the --save flag while installing

//Decorator Function
function FormatD(fun){
return function(no){
var id="DateTime"+no;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont use var and use template strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants