Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Active reading.
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 110
  • 134

There is a very simple way to implement it by replace. For ES6For ECMAScript 6:

'foo'.replace(/^./, str => str.toUpperCase())

resultResult:

'Foo'

There is a very simple way to implement it by replace. For ES6:

'foo'.replace(/^./, str => str.toUpperCase())

result:

'Foo'

There is a very simple way to implement it by replace. For ECMAScript 6:

'foo'.replace(/^./, str => str.toUpperCase())

Result:

'Foo'
deleted 3 characters in body
Source Link
Little Roys
  • 5.9k
  • 3
  • 32
  • 29

There is a very simple way to implement it by replace. Only JS For ES6:

'foo'.replace(/^./, str => str.toUpperCase())

result:

'Foo'

There is a very simple way to implement it by replace. Only JS ES6:

'foo'.replace(/^./, str => str.toUpperCase())

result:

'Foo'

There is a very simple way to implement it by replace. For ES6:

'foo'.replace(/^./, str => str.toUpperCase())

result:

'Foo'
Source Link
Little Roys
  • 5.9k
  • 3
  • 32
  • 29

There is a very simple way to implement it by replace. Only JS ES6:

'foo'.replace(/^./, str => str.toUpperCase())

result:

'Foo'
lang-js

AltStyle によって変換されたページ (->オリジナル) /