var streetaddress = addy.substr(0, addy.indexOf(','));
While it’s not the best place for definitive information on what each method does (mozilla developer network is better for that) w3schools.com is good for introducing you to syntax.
More Related Contents:
- What is the difference between String.slice and String.substring?
- How to trim a file extension from a String in JavaScript?
- How to check whether a string contains a substring in JavaScript?
- How can I use backslashes (\) in a string?
- How to check if a string contains text from an array of substrings in JavaScript?
- Get Substring between two characters using javascript
- What is the difference between substr and substring?
- Shorten string without cutting words in JavaScript
- How do I check if string contains substring? [duplicate]
- Fastest way to check a string contain another substring in JavaScript?
- How can I replace a regex substring match in Javascript?
- Regex to extract substring, returning 2 results for some reason
- How to split a string at the first `/` (slash) and surround part of it in a “?
- Get value of a string after last slash in JavaScript
- Cutting a string at nth occurrence of a character
- JavaScript text between double quotes
- How do you search an array for a substring match?
- Adding options to a using jQuery?
- JavaScript Inheritance [closed]
- Await is a reserved word error inside async function
- How to make `setInterval` behave more in sync, or how to use `setTimeout` instead?
- How to get all checked checkboxes
- ES6 Class: access to ‘this’ with ‘addEventListener’ applied on method [duplicate]
- In a regular expression, match one thing or another, or both
- Vue 3 reactivity not triggered from inside a class instance
- How to serialize & deserialize JavaScript objects?
- JSX not allowed in files with extension ‘ .js’ with eslint-config-airbnb
- How to get Client location using Google Maps API v3?
- Why does JSON.stringify not serialize non-enumerable properties?
- Python Flask Cors Issue