Học cách chuyển bất kỳ chữ nào thành chữ thường với JavaScript.
Để chuyển chuỗi bất kỳ thành chữ thường, dùng phương thức toLowerCase():
let someText = "Here is some text. Let us convert it all to lowercase" someText.toLowerCase() console.log(someText.toLowerCase()) // here is some text. let us convert it all to lowercase
toLowerCase() trả về chuỗi mới, nghĩa là nó không mutate (thay đổi) chuỗi gốc.