core/demo.js: lastIndexOf test added
core/demo.js: lastIndexOf test added
core/demo.js: format test code