Translate Applescript example to Javascript


I was trying to translate following example to JavaScript with no result.
It’s taken from

tell application "OmniFocus"
    tell default document
        make new document window with properties {perspective name:"Review"}
        activate "OmniFocus"
    end tell
end tell

Could anyone of you folks help me to do such simple things?

This is the equivalent JavaScript:

var omniFocus = Application('OmniFocus');
var window = omniFocus.DocumentWindow({ perspectiveName: 'Review' });