i trying pass through int value prop.
so if call:
<job-cards-create :jobno="1203"></job-cards-create> i get:
but if add 1 '0' infront:
<job-cards-create :jobno="01203"></job-cards-create> it gives:
what going on? missing something?
this because number 01203 being interpreted octal number due leading zero. check out these examples:
01203 === 643 // true
01203.tostring() // "643"


Comments
Post a Comment