Here is my attempt to question No 1 ( 1-6)
Answers:
window.alert(window.alert("hello"));
Ans: Here we will see a hello alert box.window.alert( );
Ans: Here no message will be seen in alert box as their is no message written inside the brackets "( )".window.alert(console.log("@double-u has more than 2700000 BP"));
Ans: Here alert box will show a message as @double-u has more than 2700000 BP.var x = 1;
console.log("window.alert( x++ )");
Ans : Here after pressing F12 we can see message as window.alert(x++).console.log(@afrog is attending the quiz);
Ans : I don't know this as there is no double quotation mark so i don't know what will be the output. If "@afrog is attending the quiz" was written like this then after F12 we can see the full sentence as message there.{
var x = 20 ; for(i=0; i<x ; i++) { console.log("x is now " + x ); }
}
Ans : here till the time 'i' is less than 'x' we will see x is now 20 in console.
Thank You
@kahkashanrkploy here is my words for your attemp.
In first part we wont just see a hello message in the alert box but we will also see another alert box with undefined message just after we press ok for the hello alert box as there are two alert functions one with parameter and another without parameter.
And first the inner alert function is executed and then outer.
In part 3 we wont see the message in alert box but in the console. also we will see a alert box with undefined message.
In part 5 we have written a complete string without the double quotation mark. that simply violates the syntax plus we have not even defined those seperately in the code so thats why web page will be loaded but in console we will see error.
You you are atleast right about the that we will see error.
times.
Thanks again for participation and keep practising.
Thanks for your participation. Kindly wait for the upvotes.
Thank You.
ok i ll wait , are my answers correct?