🏠 Go back to the homepage

The String valueOf() method

Find out all about the JavaScript valueOf() method of a string

Published Mar 12 2019

Returns the string representation of the current String object:

const str = new String('Test')
str.valueOf() //'Test'

Same as toString().

Download my free JavaScript Beginner's Handbook!

Logo



Free ebooks

JavaScript Python React HTML CSS Node.js Linux C Express.js Next.js How to Start a Blog


Knitting tutorials

© Flavio Copes

PREMIUM COURSES 👀

JavaScript Masterclass (next cohort in November) Web Development Bootcamp (next cohort 2023)

Free ebooks 👇🏼

JavaScript Python React HTML CSS Node.js Linux C Next.js How to Start a Blog

Browse by topic

Astro Blogging C Career Computer CLI CSS Database DevTools Docker Electronics Express.js Git Golang GraphQL HTML JavaScript Flavio's Lab Mac / iOS Misc Networking Next.js Node.js Phaser Python React Redis Services Svelte Swift Tools Vue.js DOM

You might also like

  • How to list all methods of an object in JavaScript
  • A Moment.js tutorial
  • An introduction to Functional Programming with JavaScript
  • Arrow functions vs regular functions in JavaScript
  • How to get last element of an array in JavaScript?
  • JavaScript Data Structures: Set
  • JavaScript Optional Chaining
  • The JavaScript super keyword
  • JavaScript Nullish Coalescing
  • How to sort an array of objects by a property value in JavaScript

© Flavio Copes