JavaScript Multiple choices


Total available count: 50
Subject - JavaScript Frameworks
Subsubject - JavaScript

 Which type is belong to javascript?


 

 

 

 



D


Solution:-

JavaScript Objects:-
A JavaScript object is an entity having state and behavior (properties and methods). For example car, pen, bike, chair, glass, keyboard, monitor, etc.
JavaScript is an object-based language. Everything is an object in JavaScript.
JavaScript is template based not class-based. Here, we don't create a class to get the object. But, we direct create objects.

Creating Objects in JavaScript
There are 3 ways to create objects.

By object literal
By creating an instance of Object directly (using the new keyword)
By using an object constructor (using the new keyword)
1) JavaScript Object by object literal
The syntax of creating object using object literal is given below:

object={property1:value1,property2:value2.....propertyN:valueN}  
As you can see, property and value is separated by : (colon).

Let’s see the simple example of creating objects in JavaScript.

<script>  
      emp={id:420,name:"Slightbook",salary:40000000}  
      document.write(emp.id+" "+emp.name+" "+emp.salary);  
</script>  

The output of the above example,
420 Slightbook 40000000




Next 5 multiple choice(s)

1

Which is not javascript types?

2

When isNaN() function returns true?

3

Who developed JavaScript?

4

Among JavaScript and ASP script, which is faster?

5

What would be the result of  5+2+"3" in JavaScript?

Comments