Source |
CodingSec |
Identifiant |
4141 |
Date de publication |
2016-07-15 16:00:41 (vue: 2016-07-15 16:00:41) |
Titre |
How to perform type conversion in JavaScript |
Texte |
The mechanism of converting a value or variable from one type to another type is known as type conversion. There two types of type conversion: implicit type conversion and explicit type conversion. Implicit Type Conversion: Type conversion which is performed automatically by the JavaScript interpreter is known as implicit type conversion or coercion. Implicit type conversion may take place when the expected type is different from the actual type of the value given from the user or read from a file etc. For example, consider the following expression: “John” + 123 It can be observed that in the above |
Envoyé |
Oui |
Condensat |
123 above actual another appeared automatically can coding coercion consider conversion conversion: converting different etc example expected explicit expression: file first following from given how implicit interpreter javascript known may mechanism observed one perform performed place post read security take two type types user value variable when which “john†|
Tags |
|
Stories |
|
Notes |
|
Move |
|