Explain Typecasting in Javascript?


Posted On: Feb 22, 2018


In Programming whenever we need to convert a variable from one data type to another Typecasting is used. In Javascript, we can do this via library functions. There are basically 3 typecasts are available in Javascript Programming, they are:

  • Boolean(value): Casts the inputted value to a Boolean
  • Number(value): Casts the inputted value to an Integer or Floating point Number.
  • String(value) : Casts the inputted value value a string

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    JavaScript Interview Questions

    Explain what is Javascript?

    Javascript Javascript is an object-oriented computer programming language commonly used to create interactive effects wi..