To Upper Case in 30 Seconds— JavaScript

What do we need to do?

function toUpperCaseFunc(str){}
const arrayOfWords = str.split(" ")
for( let i = 0; i < arrayOfWords.length; i++){
let array = arrayOfWords[i]
word.push(array.charAt(0).toUpperCase() + array[i].slice(1))
}
let word = [];
for( let i = 0; i < arrayOfWords.length; i++){
let array = arrayOfWords[i]
word.push(array.charAt(0).toUpperCase() + array[i].slice(1))
}
function(str){
let arrayOfWords = str.split(" ")
let word = [];
for( let i = 0; i < arrayOfWords.length; i++){
let array = arrayOfWords[i]
word.push(array.charAt(0).toUpperCase() + array[i].slice(1))
}
return word.join(" ")
}

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A better React folder structure

Patterns for Using GreenSock in Angular

React Component Tree

How to customize error page selection logic in Spring Boot

Enable Angular Google Analytics

ESP32 Digital Inputs and Digital Outputs

Explain What Single-Threaded JavaScript Means Like You Are 5 Years Old

Lexical Scope System & How it works In JavaScript

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anthony Johnson

Anthony Johnson

More from Medium

ReactJS Summary — Part #1

Creating a Firebase Project with ES5 Javascript on Mac & Saving to GitHub

Get started with JavaScript, MongoDB and GitHub

Intensive Interview Question for NodeJs & JavaScript (My Experience).