Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What will be the output of following copde snippet? <script type=\"text/javascri

ID: 3542347 • Letter: W

Question

What will be the output of following copde snippet?

<script type="text/javascript">

function x()

{

var s = "Eat to live, but do not live to eat";

var pattern = new RegExp("eat$");

document.write(pattern.exec(s));

}

</script>

a) Eat

b) eat

c) undefined

d) Eat eat

What will be the output of following copde snippet?

<script type="text/javascript">

function x()

{

var cst = "We are Fast Growing Software Company located in Jalandhar, India.";

var pattern = new RegExp("in","g");

document.write(pattern.exec(cst) + " ");

document.write(pattern.exec(cst) + " ");

document.write(pattern.exec(cst) + " ");

}

</script>

a) in in In

b) in in in

c) in in null

d) in null null

-________ method is used to remove focus from the specified object.

a) blur()

b) focus()

c) None

Explanation / Answer

b

c

a

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote