Are string indexes in Codeless different than they are in JavaScript?

I’m new to Backendless (coming from Bubble).

I’m really enjoying Backendless’ Codeless Fundamentals course. Best no-code course I’ve taken and I’ve taken many…Bubble courses, Wappler courses, Softr courses, etc.

@mark-piller’s videos, quality and clarity wise, are on par with Mosh Hamedani’s coding courses…and that’s a pretty high bar in my opinion.

One thing in video 8 (working with strings) is throwing me off. When trying to find the location of the first instance of “day” in the string “Today is a great day!”, the console.log (print) results in the number 3.

From what I understand, as you build out Codeless logic, JavaScript is generated in the background. JavaScript indexing starts at 0…not 1. So shouldn’t the first instance of “day” in the string be 2…not 3?

Disclaimer: I’m probably the world’s worst amateur coder so it’s likely that I’m missing something fundamentally obvious.

If anyone here can clear it up for me, I’d greatly appreciate it.

Thanks!

Hi Eddie,

Thank you for the compliments, I am glad you find the course helpful.

Indexes in Codeless start at 1. You’re right that being based on JS, they should start with 0. Our thinking was that for non-developers, zero-based indexing would not be natural. It is indeed weird, that’s not how we humans count… :wink:

Regards,
Mark

1 Like