The document is a quiz on JavaScript fundamentals. It contains 12 questions and answers about JavaScript topics like what JavaScript is, the difference between ECMAScript and JavaScript, what ES6 and Node.js are, the difference between constants and variables, primitive values and reference types, dynamic typing, undefined vs null, what objects and arrays are, and the difference between objects and arrays. An example is also provided to create an object with specifications for the Samsung S21 and output the storage and ram values.
The document is a quiz on JavaScript fundamentals. It contains 12 questions and answers about JavaScript topics like what JavaScript is, the difference between ECMAScript and JavaScript, what ES6 and Node.js are, the difference between constants and variables, primitive values and reference types, dynamic typing, undefined vs null, what objects and arrays are, and the difference between objects and arrays. An example is also provided to create an object with specifications for the Samsung S21 and output the storage and ram values.
The document is a quiz on JavaScript fundamentals. It contains 12 questions and answers about JavaScript topics like what JavaScript is, the difference between ECMAScript and JavaScript, what ES6 and Node.js are, the difference between constants and variables, primitive values and reference types, dynamic typing, undefined vs null, what objects and arrays are, and the difference between objects and arrays. An example is also provided to create an object with specifications for the Samsung S21 and output the storage and ram values.
Ans: JavaScript is a computer programming language. It is used both on the client-side and server-side that allows you to make web pages interactive. HTML and CSS are language that give structure and style to the browser. Here are some basics things JavaScript is used for: Web apps Mobile apps Chat apps Games Command lines
Qno2: What is the difference between ECMAScript and JavaScript ?
Ans: ECMAScript JavaScript ECMA is a company which JavaScript is a computer write standards for java programming language Script language. Qno3: What is ES6 ? Ans: ES6 stands for ECMAScript 6. ECMAScript is a company which write standards for JavaScript. ES6 is the 6th version of ECMAScript. It was published in 2015, and is also known as ECMAScript 2015.
Qno4: What is the purpose of Node JS ?
Ans: Node JS was created by Rayn Dahl in 2009. It embed v8 engine in C++ code to create an environment for executing JavaScript code outside of the browser. Before Node we can do only FrontEnd with JS, After Node we can do BackEnd with JS
Qno5: What is the difference between constant and variable ?
Ans: Constant Variables A constant does not change A variable is a container that its value and it remains the holds our data for temporarily. same forever. We declare a variable from var. We declare a constant from Before ES6 we use var and come const. a lot of mistakes so after ES6 Mostly constant is used for now we use let to declare a mathematical expressions. variable. Let say: Here some example of variable are: Qno6: What is the difference between primitive value and reference type? Ans: Primitive Value Reference Type
Primitive values are data Reference type are objects
that are stored on the that are stored in the heap. stack. Reference type is divided We have five parts of into three parts. primitive value. Objects String Functions Number Arrays Boolean Examples are: Undefined Null Examples are:
Qno7: What are dynamic type ?
Ans: In dynamic type, we have decided the type of the variable in run time. Example: Qno8: What is the difference between undefined and null ? Ans: Undefined Null
Undefined means a variable We us null in a situation
has been declared but has where we want to clear not yet been assigned a the value of a variable. value Example: Example:
Qno9: What is an Object ?
Ans: An object is a combination of key value pairs. We combine key value pairs and put in one object. Example: Qno10: What is an Array ? Ans: An array is a single variable that is used to store different elements. For example:
Qno11: What is the difference between object and array ?
Ans: Object Array
An object is a combination An array is a single
of key value pairs. variable that is used to We combine key value store different elements. pairs and put in one object.
Qno12: Create an object of Samsung S21 specifications, your specification
will be ram, storage, processor, camera, selfiCamera. Show storage and ram on the console.. Coding:-