Question:- What are the falsy values in JavaScript, and how can we check if a value is falsy?
Answer:- Those values which become false while converting to Boolean are called falsy values. const falsyValues = [', 0, null, undefined, NaN, false]; We can check if a value is falsy by using the Boolean function or the Double NOT operator (!!).
Question:- What do you understand by hoisting in JavaScript?
Answer:- Hoisting is the default behavior of JavaScript where all the variable and function declarations are moved on top. In simple words, we can say that Hoisting is a process in which, irrespective of where the variables and functions are declared, they are moved on top of the scope. The scope can be both local and global.
Question:- Which of the following statement shows the primary difference between JavaScript and Java? a. There is no difference between JavaScript and Java. b. Functions are considered as fields. c. Variables are specific. d. Functions are values, and there is no such distinction between methods and fields.
Answer:- D is the correct option. We know that Java is an OOP language while JavaScript is an OOP scripting language. The most fundamental difference between JavaScript and Java is that the functions are values, and there is no such distinction between methods and fields.
Question:- Which of the following syntax is valid for creating a RegExp object? 1. var txt=new RegExp(pattern,attributes); 2. var txt=/pattern/attributes; a. Only 1 syntax b. Only 2 syntax c. Both 1 and 2 syntax d. None of the above
Answer:- C: Both the statements are correct and can be used for creating a RegExp object.
Question:- Which of the following statement specifies the meaning of Augmenting classes? a. Objects inherit prototype properties even in a dynamic state. b. Objects inherit prototype properties only in a dynamic state. c. Objects inherit prototype properties in the static state. d. An object doesnt inherit prototype properties in the static state.
Answer:- A: "Objects inherit prototype properties even in a dynamic state" is the correct answer.
Question:- If para1 is the DOM object for a paragraph, which of the following would be the correct syntax to change the text within the paragraph? a. para1="New Text" b. firstChild.nodeValue= "New Text"; c. value="New Text"; d. nodeValue="New Text";
Answer:- C: "para1.value="New Text";" is the correct syntax to change the text within the paragraph.
Question:- Which of the following is used to define the behavior of the instances present of a class inside a method? a. Method b. Classes c. Interfaces d. Classes and Interfaces
Answer:- B: "Classes" is the correct answer. The classs behavior is defined by the class and is shared by all instances.
Question:- Which of the following statement is true in the case of the property of the JSON() method? a. A JSON() method can be invoked manually as object.JSON() b. A JSON() method is invoked automatically by the JSON.stringify() method c. A JSON() method is automatically invoked by the compiler. d. A JSON() method cannot be invoked in any form.
Answer:- B is the correct option. The JSON() method is most commonly used to exchange data to/from a web server. When we send data to a web server, the data has to be a string. In this case, json.strigify() is used to convert a JavaScript object into a string.
Question:- Which of the following statement is true if class B can extend another class A? a. A is the superclass, and B is the subclass. b. B is the superclass, and A is the subclass. c. Both A and B are the superclass. d. Both A and B are subclass.
Answer:- A: "A is the superclass and B is the subclass" is the correct answer. A class is called a superclass if it can define a subclass. Subclasses are also called extensions of a superclass.
Question:- Which of the following is the correct syntax of the eval() function? a. [objectName.]eval(numeric) b. [EvalName.]eval(string) c. [EvalName.]eval(numeric) d. [objectName.]eval(string)
Answer:- D is the correct option. The eval() function is used to evaluate or execute an argument. If the argument is an expression, the eval() function evaluates the expression. If the argument is one or more JavaScript statements, the eval() function executes the statements.
Question:- What is AWS?
Answer:- AWS stands for Amazon Web Services. It is a service which is provided by the Amazon that uses distributed IT infrastructure to provide different IT resources on demand. It provides different services such as an infrastructure as a service, platform as a service, and software as a service.
Question:- What are the components of AWS?
Answer:- The following are the main components of AWS are: - Simple Storage Service: S3 is a service of aws that stores the files. It is object-based storage, i.e., you can store the images, word files, pdf files, etc. The size of the file that can be stored in S3 is from 0 Bytes to 5 TB. It is an unlimited storage medium, i.e., you can store the data as much you want. S3 contains a bucket which stores the files. A bucket is like a folder that stores the files. It is a universal namespace, i.e., name must be unique globally. Each bucket must have a unique name to generate the unique DNS address. - Elastic Compute Cloud: Elastic Compute Cloud is a web service that provides resizable compute capacity in the cloud. You can scale the compute capacity up and down as per the computing requirement changes. It changes the economics of computing by allowing you to pay only for the resources that you actually use. - Elastic Block Store: It provides a persistent block storage volume for use with EC2 instances in aws cloud. EBS volume is automatically replicated within its availability zone to prevent the component failure. It offers high durability, availability, and low-latency performance required to run your workloads. - CloudWatch: It is a service which is used to monitor all the AWS resources and applications that you run in real time. It collects and tracks the metrics that measure your resources and applications. If you want to know about the CloudWatch in detail, then click on the below link: Click here - Identity Access Management: It is a service of aws used to manage users and their level of access to the aws management console. It is used to set users, permissions, and roles. It allows you to grant permission to the different parts of the aws platform. If you want to know about the IAM, then click the below link: Click here - Simple Email Service: Amazon Simple Email Service is a cloud-based email sending service that helps digital marketers and application developers to send marketing, notification, and transactional emails. This service is very reliable and cost-effective for the businesses of all the sizes that want to keep in touch with the customers. - Route53: It is a highly available and scalable DNS (Domain Name Service) service. It provides a reliable and cost-effective way for the developers and businesses to route end users to internet applications by translating domain names into numeric IP addresses.
Question:- What are Key-pairs?
Answer:- An Amazon EC2 uses public key cryptography which is used to encrypt and decrypt the login information. In public key cryptography, the public key is used to encrypt the information while at the receivers side, a private key is used to decrypt the information. The combination of a public key and the private key is known as key-pairs. Key-pairs allows you to access the instances securely.
