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
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.