10.02.2018 Views

js_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

Syntax<br />

Its syntax is as follows:<br />

string.constructor<br />

Return Value<br />

Returns the function that created this object's instance.<br />

Example<br />

Try the following example.<br />

<br />

<br />

JavaScript String constructor property<br />

<br />

<br />

<br />

var str = new String( "This is string" );<br />

document.write("str.constructor is:" + str.constructor);<br />

<br />

<br />

<br />

Output<br />

str.constructor is:function String() { [native code] }<br />

Length<br />

This property returns the number of characters in a string.<br />

Syntax<br />

Use the following syntax to find the length of a string:<br />

string.length<br />

Return Value<br />

Returns the number of characters in the string.<br />

Example<br />

137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!