If you didn't see the SyntaxError: unterminated string literal error message, please find your browser's JavaScript console. It's a basic tool to debug JavaScript.
Sign up to request clarification or add additional context in comments.
Comments
1
Should be
var url = "data\\14/loto/posts.json" // "\\" is because slash should be escaped, otherwise your url isn't a valid string
url = url.replace(/\\/g, '/');
SyntaxError: unterminated string literalerror message, please find your browser's JavaScript console. It's a basic tool to debug JavaScript.