{"componentChunkName":"component---src-templates-blog-post-js","path":"/typeConversion/","webpackCompilationHash":"fbb20c27e610daab547e","result":{"data":{"site":{"siteMetadata":{"title":"Articles","author":"Aman-Sharma"}},"markdownRemark":{"id":"d605a97d-5ad0-5811-a85b-7c444f25ef32","excerpt":"Meaning Of TypeConversion In js It Means That The Converting One Type Of DataType Into Another Typeof It Happens By Two Types Implicitly and Explicitly Implicit…","html":"<h2>Meaning Of TypeConversion In js</h2>\n<p><em>It Means That The Converting One Type Of DataType Into Another Typeof It Happens By Two Types Implicitly and Explicitly</em></p>\n<ol>\n<li>\n<h2>Implicit TypeConversion :-</h2>\n</li>\n</ol>\n<p><em>It happens dynamiclly but the value must be same and datatype can of any type it return either true or false depend upon what value you enters</em></p>\n<p>Eg:-</p>\n<h2>==(<em>doubble Equal too</em>)</h2>\n<p>“10”==10 <em>true</em></p>\n<ol start=\"2\">\n<li>\n<h2>Explicit TypeConversion :-</h2>\n</li>\n</ol>\n<p><em>We Have To Implement It Manually In Our Conversion. There Are Many Predefined Functions Which Are Used for The Explicit Conversion Explain Below</em></p>\n<ol>\n<li>To String (\"\"):-</li>\n</ol>\n<p> <em>String();</em></p>\n<p> Eg:-\nString(10);\n“10”</p>\n<ol start=\"2\">\n<li>To Number (1,2,3 Etc.):-</li>\n</ol>\n<p><em>Number();</em></p>\n<p>Eg:-\nNumber(“10”);\n10</p>\n<ol start=\"3\">\n<li>To Boolean (true,false):-</li>\n</ol>\n<p><em>Boolean();</em></p>\n<p>Eg:-\nBoolean(1);\ntrue</p>\n<p>Boolean(0);\nfalse</p>\n<h2>Summary And Additional Information:-</h2>\n<ol>\n<li>*Numeric conversion happens in mathematical functions and expressions automatically.</li>\n</ol>\n<p>For example, when division / is applied to non-numbers:</p>\n<p>Console.log( “6” / “2” ); // 3, strings are converted to numbers*</p>\n<ol start=\"2\">\n<li>Addition ‘+’ concatenates strings\nAlmost all mathematical operations convert values to numbers. A notable exception is addition +. If one of the added values is a string, the other one is also converted to a string.</li>\n</ol>\n<p>Then, it concatenates (joins) them:</p>\n<p> console.log( 1 + ‘2’ ); // ‘12’ (string to the right)\nconsole.log( ‘1’ + 2 ); // ‘12’ (string to the left)</p>","frontmatter":{"title":"TypeConversion In Js","date":"September 12, 2019","description":" Complete Particulars About The TypeConversion in JavaScript "}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"slug":"/typeConversion/","previous":{"fields":{"slug":"/dataTpes in js/"},"frontmatter":{"title":"DataTypes in javaScript"}},"next":{"fields":{"slug":"/VariableDeclartion in Js/"},"frontmatter":{"title":"Es6 Variable Declaration"}}}}}