Sharp Tutorial
java script objects

Python

Java

C

C++

HTML/CSS

Java Script

PHP

SQL

C Programs

Java Script

  • java script home
  • introduction
  • Variable Declare & Make Comment
  • operator
  • if else
  • loop
  • Array
  • Function
  • Java Script Objects
  • Java Script DOM

JS based examples

  • two number sum and diff programs
  • Pattern program in java script
  • zumble word quiz
  • Random number guess program
  • calculator in java script
  • digital clock in java script

HTML

  • HTML Home
  • Introduction
  • Commonly used tags
  • Formatting
  • Working with class
  • Apply Css
  • Layout
  • Link / Image
  • Html Forms
  • Html Tables
  • Responsive Design

CSS

  • Introduction
  • Types of Css
  • Background and Color
  • Css Formatting
  • Css Layout
  • Css Animation
  • Css Table
  • Css Effects
  • Css Pagination
  • Css Media Query

Java Script Objects

Java Script object may contain multiple values in a single object . Eg  a student may have different features like rollNo, Name,  Course etc. Following is the example how we can create a object in JS.

 

var student ={rollNo:4392, name:"john",course:"BE"};

Your can also create the object of inbuilt classes as following and you must not use these class names as your object names

 

var s= new String();

Java Script object values may be accessed as following 

 

<html>
<title>JS introduction</title>
<head>
<script>
var student ={rollNo:4392, name:"john",course:"BE"};
document.write("RollNo="+student.rollNo+" name="+student.name+"course="+student.course);

</script>
</head>
<body>
</body>
</html>

    Output: RollNo=4392 name=john course=BE

[codepen_embed height="265" theme_id="default" slug_hash="VwYKGRb" default_tab="js,result" user="rajputadesh"]See the Pen VwYKGRb by rajput adesh (@rajputadesh) on CodePen.[/codepen_embed]

Enquiry about Course

Ask your Question

Click Here

Sharp (2) Tutorials

Video/ C Introduction

Watch video in full size

Video tutorial

Follow by Email
Facebook
Facebook
fb-share-icon
YouTube
Copyright © Sharp Tutorial
Build with WordPress
Wordpress Social Share Plugin powered by Ultimatelysocial
Sharp Tutorial