Last active
August 26, 2021 07:07
-
-
Save iamshareque/d66ee78894886b1bd3dd87e0de629d5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Avoid using let for variable declaration use var | |
let x=10; or const x=10; | |
var x=10; (compatibale) | |
2) Avoid using default value for funcation parameter | |
function add(a,b=20){ | |
} | |
//instead use this way | |
funcation add(a,b){ | |
var b; | |
if (typeof b === "undefined") { b = 20; } | |
} | |
3) Avoid using arrow funcation | |
hello = () => { | |
return "Hello World!"; | |
} | |
4) Avoid javacript template string like (don't use ``) | |
`this is template string ${xvriable} eclosed in backquote ` | |
5) this will help to convert ES6 to ES5 https://babeljs.io/repl | |
6) old iphone when using div with onclick="" | |
must add css: cursor: pointer; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment