summaryrefslogtreecommitdiff
path: root/tests/auto/qml/reformatter/arrowFunction.qml
blob: 21c0fee7462c23f79f657e5e79af6f1ffe73eef1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import QtQuick 2.15

Rectangle {
    Component.onCompleted: {
        const values = ["10", "20", "30", "40"]
        const result = values.map(value => parseInt(value))
        const result2 = values.map(value => parseInt(value))
        const result3 = values.map(value => {
                                       return parseInt(value)
                                   })
        const result4 = values.map((value, i) => parseInt(value) + i)
        const result5 = values.map((value, i) => {
                                       return parseInt(value) + i
                                   })
    }
}