{
    "path": "/home/krm/dev/mimer-academia/programing/js/datatypes/Questions/function.sv.json",
    "s": "Ignor",
    "invert": true,
    "level": 1,
    "title": [
        "Funktions"
    ],
    "author": [
        "krm"
    ],
    "created": {
        "year": 2023,
        "month": 10,
        "day": 26
    },
    "status": "alpha",
    "description": [
        "Ange värdet på utrycket nedan."
    ],
    "statments": [],
    "comment": [],
    "cards": [
        {
            "level": 1,
            "index": 1,
            "exactly": true,
            "title": [
                "function foo(x){return x+1}; foo(1)"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "2"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 2,
            "exactly": true,
            "title": [
                "function dubla(x){return 2*x}; dubla(dubla(3))"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "12"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 3,
            "exactly": true,
            "title": [
                "let aoo = (x,y) => (x+1)*y; aoo(3,5)"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "20"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 4,
            "exactly": true,
            "title": [
                "typeof function(){}"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "function"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 5,
            "exactly": true,
            "title": [
                "let boo = x => x*x*x; typeof boo"
            ],
            "description": [],
            "statments": [
                {
                    "description": [
                        "function"
                    ]
                }
            ],
            "comment": [],
            "kind": "question"
        },
        {
            "level": 1,
            "title": [
                "🪧 Vi leker med funktioner"
            ],
            "description": [],
            "lang": "js",
            "code": "function add(x,y) {\nlet result = x+y\nconsole.log(x + \"+\" + y + \" = \" + result);\nreturn result;\n}\nfunction mult(x,y) {\nlet result = x*y;\nconsole.log(x + \"*\" + y + \" = \" + result);\nreturn result;\n}",
            "statments": [],
            "comment": [],
            "cards": [
                {
                    "level": 2,
                    "index": 6,
                    "exactly": true,
                    "title": [
                        "add(add(1,2),add(3,4))"
                    ],
                    "description": [],
                    "statments": [
                        {
                            "description": [
                                "10"
                            ]
                        }
                    ],
                    "comment": []
                },
                {
                    "level": 2,
                    "index": 7,
                    "exactly": true,
                    "title": [
                        "add(mult(add(3,3),3),3)"
                    ],
                    "description": [],
                    "statments": [
                        {
                            "description": [
                                "21"
                            ]
                        }
                    ],
                    "comment": []
                },
                {
                    "level": 2,
                    "index": 8,
                    "exactly": true,
                    "title": [
                        "Utskriften av: add(mult(add(3,3),3),3)"
                    ],
                    "description": [],
                    "statments": [
                        {
                            "description": [
                                "3+3 = 6\\n6",
                                "3 = 18\\n18+3 = 21\\n"
                            ]
                        }
                    ],
                    "comment": []
                }
            ],
            "kind": "question"
        },
        {
            "level": 1,
            "title": [
                "🪧 Vi leker mer med funktioner"
            ],
            "description": [],
            "lang": "js",
            "code": "function cost(p,r,h) {\nreturn p*r*r*cost.pi*h;\n}\ncost.description = \"A function to calculate cost of a cylinder\";\ncost.pi = 3.14;",
            "statments": [],
            "comment": [],
            "cards": [
                {
                    "level": 2,
                    "index": 9,
                    "exactly": true,
                    "title": [
                        "cost.description"
                    ],
                    "description": [],
                    "statments": [
                        {
                            "description": [
                                "A function to calculate cost of a cylinder"
                            ]
                        }
                    ],
                    "comment": []
                },
                {
                    "level": 2,
                    "index": 10,
                    "exactly": true,
                    "title": [
                        "cost(1,1,1)"
                    ],
                    "description": [],
                    "statments": [
                        {
                            "description": [
                                "3.14"
                            ]
                        }
                    ],
                    "comment": []
                },
                {
                    "level": 2,
                    "index": 11,
                    "exactly": true,
                    "title": [
                        "cost.pi*2"
                    ],
                    "description": [],
                    "statments": [
                        {
                            "description": [
                                "6.28"
                            ]
                        }
                    ],
                    "comment": []
                },
                {
                    "level": 2,
                    "index": 12,
                    "exactly": true,
                    "title": [
                        "cost(1/Math.PI,1,1)"
                    ],
                    "description": [],
                    "statments": [
                        {
                            "description": [
                                "0.9994930426171028"
                            ]
                        }
                    ],
                    "comment": []
                }
            ],
            "kind": "question"
        },
        {
            "level": 1,
            "index": 13,
            "reflection": true,
            "title": [
                "Implmentera en funktion som tar ett tal som argumnet och returnärar ett värde som är fem gånger så stort."
            ],
            "description": [],
            "statments": [],
            "comment": [],
            "kind": "question"
        }
    ],
    "kind": "questions"
}