Why I cannot map over notesArray

• Dec 29, 2023 - 20:08

Here is my code I cannot map over newElement this element is a chord with three notes and when I console.log(newElement.length) it gives me three so it is definitely an array do you guys know the problem ?
import QtQuick 2.0
import MuseScore 3.0

MuseScore {
menuPath: "Plugins.pluginName"
description: "Description goes here"
version: "1.0"
onRun: {
var cursor = curScore.newCursor();
cursor.rewind(0);
var newElement = cursor.element.clone();
cursor.next();

    // Log notes
    newElement.notes.map(function(item) {
        console.log(item);
    });
}

}

Do you still have an unanswered question? Please log in first to post your question.