in Technology by
Predict the output of the following JavaScript code. a = 8 + "8"; document.write(a); A) 16 B) Compilation Error C) 88 D) Run Time Error

1 Answer

0 votes
by

Ans: Option C -88
Explanation: In the above given code, 8+”8″ have first integer and second string data types. Rather than adding the two numbers, it concatenated the two.
\linebreak

Related questions

0 votes
    Predict the output of the following JavaScript code.
    Predict the output of the following code snippet function foo(input: boolean) { let one = 1200; if (input) { let ans ... 1. 1201 2. Undefined 3. Compilation error 4. Runtime error...
asked Jun 29, 2021 in Technology by JackTerrance
0 votes
    What is the HTML tag under which one can write the JavaScript code? A) B) C)
    Can you execute javascript code from java 8 code base in Java8?...
asked Nov 8, 2020 in Education by Editorial Staff
0 votes
    Write the short cut keys to move text in word document. 1. ctrl+A 2.Alt+m 3.ctrl+x ctrl+v 4. Ctrl+p ctrl+Q Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    1. Predict the output of the following operations if x=5 and y=3. x>=10&& y>=4 f. x>=1 || y>=4 Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
0 votes
    Predict the output of the following: Print(52*7) Print(“52*7”) Print(“52*7=”,52*7) Print(“52″*7) Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    Write html code to set the BGCOLOR as NAVY, header 1 text Text Example with size, colour and font face'' as ... font face ARIAL . Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    Which tag is used to write the javascript code 1. 2. 3. 4....
asked Dec 24, 2020 in Technology by JackTerrance
...