mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-06 01:18:23 +08:00
Update String/CheckCamelCase.js
Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
This commit is contained in:

committed by
GitHub

parent
e48f5e2192
commit
8722d52980
@ -10,7 +10,7 @@
|
||||
const CheckCamelCase = (varName) => {
|
||||
// firstly, check that input is a string or not.
|
||||
if (typeof varName !== 'string') {
|
||||
return 'Not string(s)'
|
||||
return new TypeError("Argument is not a string.")
|
||||
}
|
||||
|
||||
const pat = /^[a-z][A-Za-z]*$/
|
||||
|
Reference in New Issue
Block a user