how to capitalize a letter based on an index in javascript
function capitalize(s,arr){
s = s.split("");
for(var i = 0; i < arr.length; i++){
if (s[arr[i]] == null) { continue }
s[arr[i]]=s[arr[i]].toUpperCase();
}
s = s.join('');
return s;
};
Also in JavaScript:
- parsing through json without using key value python
- copy object javascript
- onclick in js
- chess.js
- javascript add row to table
- discord js presence update
- javascript alert
- javascript check if array is empty
- alert library css and js
- closure in javascript
- how to move div using jquery
- javascript window.history.pushState
- map object array javascript
- Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
- match ids from 2 arrays in javascript asynchronous programming
- jquery attr
- pass props in react
- input in javascript
- js add body data to put request
- javascript round down
- loopback before save
- tableau js
- javascript set attribute href
- javascript button