Home NIMI TRADE THEORY MOCK TEST COPA Mock Test 11 - JavaScript and Creating Web Page COPA Mock Test 11 - JavaScript and Creating Web Page Author - personVIKASH NIMBRAIN September 24, 2023 0 share 1. What is the process of writing instructions to be executed by the computer? a) Debugging b) Executing c) Presenting d) Programming 2. Which is a statement terminator in JavaScript? a) , b) ; c) : d) .. 3. Who developed JavaScript? a) Brendan Eich b) Brendan Rich c) John Eckerl d) John Mauchy 4. Which programming language's syntax influences JavaScript syntax? a) C b) COBOL c) Java d) JDK 5. Which web server provides good customer support if it has any issues? a) Apache b) IIS c) LiteSpeed d) Nginx 6. Which web server has high performance stability, simple configuration, and low resource usage? a) Apache b) IIS c) LiteSpeed d) Nginx 7. Which key is used to declare a variable in JavaScript? a) const b) dec c) dim d) var 8. Which is a variable separator if more than one variable is declared in one statement? a) , b) : c) - d) / 9. Which brackets are used to write an array in JavaScript? a) Curved brackets b) Square brackets c) Curly brackets d) Corner brackets 10. Which bracket is used to write an object in JavaScript? a) Curved brackets b) Square brackets c) Curly brackets d) Corner brackets 11. How many types of operations are there in JavaScript? a) 3 b) 4 c) 6 d) 8 12. What is the purpose of the modulo (%) operator in JavaScript? a) Percentage value b) Product value c) Remainder value d) Quotient value 13. How many parts are there in a 'For' loop? a) 2 b) 3 c) 4 d) 5 14. Which part in a loop evaluates the conditions? a) Condition part b) Increment/Decrement part c) Initialization part d) Looping part 15. How many types of errors are there in JavaScript programming? a) 3 b) 4 c) 6 d) 8 16. How many different values can be returned by the error name property in JavaScript? a) 3 b) 4 c) 5 d) 6 17. Which object method is used to return the value rounded down to its nearest integer? a) abs() b) ceil() c) floor() d) round() 18. Which special variable holds more than one value at a time? a) Array b) Element c) Function d) Object 19. Which is the parameter name separator in JavaScript? a) , b) : c) - d) / 20. Which function in JavaScript converts a number to a string? a) Num() b) Str() c) String() d) toString() 21. Which allows developers to bundle all functionality under a unique application-specific name? a) Class b) Namespace c) Object d) Property 22. Which is a valid JavaScript code to sort elements of an array 'trade'? a) Trade.sort: b) Trade.sort(); c) Sort.trade(); d) Sort.(trade); 23. What is the full form of BOM in JavaScript? a) Browser Object Method b) Browser Object Model c) Browser Oriented Method d) Browser Oriented Model 24. What is the full form of TOC in JavaScript? a) Text of Content b) Time of Calculation c) Table of Content d) Terminator of Content 25. Which is the first phase of the System Development Life Cycle? a) Testing b) Planning c) Developing d) Defining 26. What is the abbreviation of W3C in DOM? a) Word Wide Web Curriculum b) World Wide Web Consortium c) World Wide Web Centre d) World Wide Web Content 27. What is the main purpose of JavaScript? a) Client-side validation b) Create web browsers c) Read and write files d) Store data in the server 28. Which one is responsible for running JavaScript code? a) Browser b) Notepad++ c) Sublime Text d) Visual Studio Code 29. Which one enables hosting providers to manage multiple domains on a single server? a) Network server b) SQL server c) Web server d) Database server 30. Which sign represents the 'assignment' operator in JavaScript? a) = b) # c) == d) < > 31. Which data type in JavaScript returns the value 'True' or 'False'? a) Boolean b) Dynamic c) Object d) String 32. Which operator is used to check both value and type in JavaScript? a) # b) = c) == d) === 33. Which assignment operator is equivalent to 'a = a * 5'? a) a = 5 * 9 b) a = * 5 c) a *= 5 d) a = 5 34. Which single character escape sequence represents 'line feed' in JavaScript? a) \b b) \f c) \n d) \t 35. What is the purpose of the Initialization part in a 'for' loop? a) Exit the loop b) Evaluate the condition c) Increase or decrease the initial variable d) Initialize the variable 36. Which keyword in a switch case statement specifies the code to run if there is no case match? a) Break b) Case c) Default d) End 37. Which statement is used to test a block of code for errors? a) Catch b) Finally c) Throw d) Try 38. Which statement is used to handle an error? a) Try b) Catch c) Throw d) Finally 39. Which statement is used to create a custom error in JavaScript? a) Catch b) Finally c) Throw d) Try 40. Which statement is used to execute code after try and catch? a) Finally b) Syntax error c) Throw d) Type error 41. Which error indicates that the number is outside the range of legal values? a) Range Error b) Reference Error c) Type Error d) URI Error 42. Which error indicates that the variable used is not declared? a) Eval Error b) Range Error c) Reference Error d) Syntax Error 43. Which error indicates that the value is outside the range of expected type? a) Eval Error b) Range Error c) Syntax Error d) Type Error 44. Which is used to access an individual value in an array? a) Content Number b) Element Number c) Table Number d) Variable Number 45. What is the purpose of the length property in an array? a) Returns the number of array elements b) Returns the number of characters c) Returns the number of fields in an object array d) Returns the number of the highest array index 46. Which method joins all array elements into a string with a specified separator? a) Join() b) Pop() c) Push() d) ToString() 47. Which method removes the last element from an array? a) Join() b) Push() c) Pop() d) Shift() 48. Which method is used to add a new element to an array? a) Join() b) Push() c) Pop() d) Shift() 49. Which method removes the first array element? a) Join() b) Pop() c) Push() d) Shift() 50. Which variable works as a function argument in JavaScript? a) Function variable b) Global variable c) Local variable d) Object variable 51. Which variable is declared outside a function in JavaScript? a) Function variable b) Global variable c) Local variable d) Object variable 52. Which feature in JavaScript has properties and methods? a) Array b) Function c) Object d) Controls 53. Which variables are deleted in JavaScript when the page is closed? a) Function variable b) Global variable c) Local variable d) Object variable 54. Which method is called at the moment of instantiation of an object? a) Constructor b) Inheritance c) Polymorphism d) Property 55. Which is an instance of a class? a) Class b) Namespace c) Object d) Property 56. Which window method is used to move the current window? a) Move() b) MoveTo() c) Window.Move() d) Window.MoveTo() 57. Which property returns the width of the visitor's screen in pixels? a) Width() b) ScreenWidth() c) Screen.width() d) Width.screen() 58. Which property returns the URL of the current page? a) href() b) <herf> c) Location.href d) href.location 59. Which property is used to transfer files from one host to another host over the internet? a) IP b) FTP c) HTTP d) SMTP 60. Which open-source software is used to upload from the client to the server or download from the server to the client? a) PHP b) Perl c) HTTP d) FILEZILLA 61. How will JavaScript treat a number when it is enclosed with double or single quotes? a) Error b) Number c) String d) Zero 62. What will be the output for the following JavaScript code?var x = 13 + "03";alert(x); a) 16 b) 133 c) 1303 d) 13 03 63. What will be the output if the JavaScript code is executed?var x = 1324;var y = new Number(1324);if (x === y)alert("Yes");elsealert("No"); a) Infinity b) Error c) No d) Yes 64. What is the output of the following JavaScript code?var x = " ITI " ;var y = " GOVT " ;var o = y.concat(x);document.write(o); a) ITI GOVT b) ITIGOVT c) GOVTITI d) GOVT ITI 65. What is the output of the following JavaScript code?var name = " Kanya Kumari" ;var x = name.substr(8,2);document.write(x); a) um b) ma c) ar d) Ku Submit Tags NIMI COPA MOCK TESTNIMI TRADE THEORY MOCK TEST Facebook Twitter Whatsapp Newer Older