Css IMP QUESTIONS

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

1.

JavaScript is a scripting or programming language that allows you to implement complex features on web pages
2. Features of JavaScript:
i. Interpreted scripting language.
ii. Object-oriented.
iii. Lightweight and versatile.
iv. Supports asynchronous programming.
v. Can be used in both browsers and on the server-side (Node.js).
3. Advantages of JavaScript:
i. Client-side scripting.
ii. Enhances user experience.
iii. Wide browser support.
iv. Active community.
4. Disadvantages:
i. Browser compatibility issues.
ii. Limited security.
iii. Single-threaded.
5. Data Types in JavaScript : include Number, String, Boolean, Object, Array, Function, Undefined, and Null.
6. Declaring Variables in JavaScript:
 Use var, let, or const.
 Example: var x = 5;
7. In JavaScript:
 Property is a value associated with an object.
 Method is a function associated with an object.
 Dot Syntax is used to access properties and methods, e.g., object.property or object.method().
8. Prompt() allows user input, while Alert() displays a message to the user.
9. Getters & Setters are used to control access to object properties, improving encapsulation and security.
10. Defining a function:
function functionName(parameters) {
// Function code
}
11. An Array is an ordered list of values. Example: let myArray = [1, 2, 3];
12. concat() combines arrays, while join() creates a string from array elements.
13. String methods include toUpperCase(), toLowerCase(), charAt(), and more.
14. Forms are HTML elements used to collect user input.
15. Form objects and elements represent the HTML form and its components, like text fields and buttons.
16. An Event is an action or occurrence in the browser, such as a click or keypress.
17. setTimeout() and setInterval() are used to execute code after a specified delay or at regular intervals.
18.
i. setTimeout() Syntax:
setTimeout(function, delay);
ii. setInterval() Syntax:
setInterval(function, interval);
19. Cookies are small pieces of data stored in a user's browser. Session cookies are temporary and expire when the browser
is closed.
20. Creating Cookies in JavaScript:
document.cookie = "name=value; expires=date; path=path";

21. Array Methods include push(), pop(), shift(), unshift(), and many more.
22. Keywords in JavaScript include var, let, const, function, if, else, etc.
23. Different Ways to Display Output include console.log(), alert(), and updating HTML content.
24. Operators in JavaScript include arithmetic, comparison, logical, and assignment operators.
25. JavaScript Loops:

i. for loop
ii. while loop
iii. do...while loop
iv. for...in loop
v. for...of loop

26. Window Methods are used to interact with the browser window.
27. Syntax for opening a new window:
window.open("URL", "WindowName", "features");

28. Setting Expiry Date of Cookies is done by specifying the expires attribute in the document.cookie string.
29. Regular Expression is a pattern-matching language. Common methods include test(), exec(), and match().
30. Rollover typically refers to a change in appearance when a user hovers over an element.
31. A Banner Ad is a graphical advertisement often displayed on websites.
32. The Status Bar in a web application typically displays information about links when you hover over them.
33. A Dynamic Menu is a menu that can change or adapt based on user interactions or data.
34. Checkbox allows multiple selections, while a Radio Button allows only one selection in a group of options.

You might also like