Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. Assume that we have to convert “false” that is a non-string to string. The command that we use is (without invoking the “new” operator)

  2. A.

     false.toString()

    B.

     String(false)

    C.

     String newvariable=”false”

    D.

     Both false.toString() and String(false)

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    A non-string can be converted in two ways without using a new operator. false.toString() and String(false).


Be The First To Comment