Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Web Technology

(KCA-021)
Assignment-2

UNIT -2
Scripting: Introduction to JavaScript, Creating Variables in JavaScript, Creating Functions in JavaScript, UI
Events, Returning Data from Functions, Working with Conditions, looping in JavaScript, Block Scope
Variables, Working with Objects, Creating Object using Object Literals, Manipulating DOM Elements with
JavaScript.

1. What is a name function in JavaScript & how to define it? Write a CO- KCA021.2, K2
JavaScript function that accepts a string as a parameter and counts
the number of vowels within the string.

2. What is argument objects in JavaScript & how to get the type of CO- KCA021.2, K3
arguments passed to a function?

3. List out the different ways an HTML element can be accessed in a CO- KCA021.2, K3
JavaScript code. Write a JavaScript program to calculate
multiplication and division of two numbers (input from user).

4. (a) Write a JavaScript function to remove specified number of CO- KCA021.2, K2


characters from a string.
(b) Write a JavaScript function to check whether a string is blank or
not.

You might also like