// simple-js-test.baba - Simple test for JS interop debugging // Test Math.abs absResult : io.callJS "Math.abs" [-42]; io.out "Math.abs result:"; io.out absResult; // Test JSON.parse jsonStr : "{\"name\": \"Alice\", \"age\": 30}"; parseResult : io.callJS "JSON.parse" [jsonStr]; io.out "JSON.parse result:"; io.out parseResult; // Test property access propResult : when parseResult is Ok obj then io.getProperty obj "name" Err msg then Err msg; io.out "Property access result:"; io.out propResult;