How would I have this sum print out it works

function testSum(){
var expected = 7
var actual = sum(5, 2)

if (actual != expected) {
    console.log("It's broken..")
} else {
    
    console.log("It works!")
}}

I don’t know how to work this out, please help