JS.StringCount
--------------

Queries global string counter.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [JavaScript](component_JavaScript.md) | [10.1](newinversion101.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "JS.StringCount"; JSRef ) 

**MBS**( **"JS.StringCount";** /\* Queries global string counter. \*/  
**$JSRef**) /\* The JavaScript reference number.e.g. $js \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| JSRef | The JavaScript reference number. | $js |

### Result

Returns number or error.

### Description

Queries global string counter.  
A fresh JavaScript engine already has about 1000 strings.  
### Examples

Query memory statistics:

 Set Variable \[ $JS ; Value: MBS ( "[JS.New](JSNew.md)" ) \]   
Show Custom Dialog \[ "JavaScript memory statistics:" ; MBS ( "JS.StringCount"; $JS ) &amp; " strings" &amp; ¶ &amp; MBS ( "[JS.ObjectCount](JSObjectCount.md)"; $JS ) &amp; " objects" \]  
### See also

- [JS.New](JSNew.md)
- [JS.ObjectCount](JSObjectCount.md)

### Release notes

- **Version 10.1**
    - Added [JS.ObjectCount](https://www.mbsplugins.eu/JSObjectCount.shtml) and [JS.StringCount](https://www.mbsplugins.eu/JSStringCount.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 10.1pr2](https://www.mbsplugins.de/archive/2020-02-03/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 31st January 2020 , last changed 19th April 2020

  
[JS.SetGlobalPropertyValue](JSSetGlobalPropertyValue.md) - [JS.TimeToDateComponents](JSTimeToDateComponents.md)

[HTML Version](JSStringCount.shtml)