0% found this document useful (0 votes)
17 views

CSS Ass2

The document discusses arrays, functions, and strings in JavaScript. It includes questions about defining arrays and functions, declaring arrays, sorting arrays, using join(), push(), and pop() array methods, associative arrays, calling functions from HTML, string methods, converting strings to numbers, differentiating concat() and join(), counting vowels, finding duplicate array values, setting background color with a prompted color, and variable scope.

Uploaded by

nayana ahire
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

CSS Ass2

The document discusses arrays, functions, and strings in JavaScript. It includes questions about defining arrays and functions, declaring arrays, sorting arrays, using join(), push(), and pop() array methods, associative arrays, calling functions from HTML, string methods, converting strings to numbers, differentiating concat() and join(), counting vowels, finding duplicate array values, setting background color with a prompted color, and variable scope.

Uploaded by

nayana ahire
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIT II [14 Marks]

Array, Function and String


1] Define array.

2] How to declare array in JavaScript.

3] Write a JavaScript for sorting the array elements.

4] Explain the use of join () function with examples.

5] Explain the use of push and pop functions.

6] Write a short note on – associative array in JavaScript.

7] Write syntax for defining the function.

8] Explain the method of calling a function from HTML.

9] What is string? Enlist some commonly used methods for manipulating String.

10] Write a JavaScript to convert string to number.

11] Differentiate between concat() and join() methods of array object.

12] Write a JavaScript function to count the number of vowels in a given string.

13] Write a JavaScript that find and displays number of duplicate values in an array.

14] Write a function that prompts the user for a colour and uses what they select to set the
background colour of the new webpage opened

15] Explain the scope of variable with the help of programming example

16] How to retrieve a position of desired word from the string

1. write a JavaScript to call a function with argument for addition of two


numbers
2. write a JavaScript to convert a string to number
3. Explain the use of push and pop functions
4. State and explain any two properties of array object
5. Write a JavaScript function to insert a string within a string at a particular
position
6. Write a JavaScript function to count the number of vowels in a given
string.
7. Write a JavaScript that find and displays number of duplicate values in an
array.
8. Develop JavaScript to convert the given character to Unicode and vice
versa.
9. Differentiate between concat() and join() methods of array object.

You might also like