21.
var word = “information”;
var mystery = word.toUpperCase( );
What is mystery?
22.
What will be the value of copy after the following code segmentis executed?
str=’HTML’;
copy = ‘ ‘;
i = 0;
while ( i<str.length)
{
copy = copy + str.charAt(i) + ‘-‘;
i = i + 1;
}
23.
What will be the value of copy after the following code segmentis executed?
str=’CSC101′;
copy = ‘ ‘;
i = 0;
while ( i<str.length)
{
copy = str.charAt(i) + copy ;
i = i + 1;
}
24.
What will be the value of str after the following code segmentis executed?
var str = “computer”;
var i = str.search(/[aeiou]/);
while(i!=-1)
{
str = str.substring(0, i) +’*’+ str.substring(i+1,str.length);
i = str.search(/[aeiou]/);
}
Expert Answer
An answer will be send to
PayPal Gateway not configured
PayPal Gateway not configured