Day 10/60: String operations in JS
Today's note was about making string operations in js work with JavaScript strings, indexing, and character handling without losing correctness. I kept coming back to the same checks: decide early whether indexing, slices, or character arrays are the right representation in JavaScript, keep the transformation or scan state explicit instead of mixing index tricks together, and use string and array helpers deliberately so character handling does not become accidental.
The failure mode worth watching is mixing index assumptions and character handling without checking what the string API actually returns. If that happens, the implementation usually looks busy while the invariant is already gone.








