In JavaScript a number with leading zeros is considered to be in Octal system and it is read as octal value.
Ex:"0025" is read as "21".
In order to have its value preserved we should pass it as string.
Ex: myfunction(x){
alert(x);
}
we should call function as myfunction("0026")
Subscribe to:
Post Comments (Atom)
Call a function in child component from parent component in React
Consider the following parent component class Parent extends React.Component { constructor(props) { super(props); thi...
-
Open visual studio developer command prompt. Start your service and make sure it is up and running. Copy the URL of service . In visual...
-
p5.js is a JavaScript library which can be used by artists,designers,educators and beginners who want to code. Using p5.js we have a full se...
No comments:
Post a Comment