mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 04:56:23 +00:00
10 lines
189 B
Markdown
10 lines
189 B
Markdown
|
---
|
||
|
id: cc0d1937-ec92-4a2f-802d-f5fbde4e61b2
|
||
|
title: JavaScript RegExp Search Method
|
||
|
---
|
||
|
|
||
|
``` javascript
|
||
|
console.log(" word".search(/\S/)); // 2
|
||
|
console.log(" ".search(/\S/)); // -1
|
||
|
```
|