I am trying to make a program that converts a decimal number into a binary number of up to 10 digits, but I can't figure out what's wrong with my current code. I'm quite new to programming so it's possible I've not picked up on something tiny. Any help is appreciated, thank you.

HTML body: 

```
<!DOCTYPE html>
<html>
<head>
    <title>Binary converter</title>
    <script src="binaryConverter.js" type="text/javascript"></script>
</head>

<body>

    <div>

        <div>

            <table>
                <tr>
                    <td>Insert a decimal number to be converted to binary: </td>
                    <td>
                        <input type="text" id="decimal" placeholder="e.g. 54"></input>
                    </td>
                    <td>
                        <button type="button" onClick="calc()">Convert</button>
                    </td>
                </tr>
                <tr>
                    <td>Your result: </td>
                    <td id="resultCell"></td>
                    <td></td>
                </tr>
            </table>

        </div>

    </div>

</body>

</html>

```

JavaScript body:

```
function calc() {

    var result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,];
    var decimal = document.getElementById("decimal").value;

    result[9] == decimal % 2;
    decimal == result[9];

    result[8] == decimal % 2;
    decimal == result[8];

    result[7] == decimal % 2;
    decimal == result[7];

    result[6] == decimal % 2;
    decimal == result[6];

    result[5] == decimal % 2;
    decimal == result[5];

    result[4] == decimal % 2;
    decimal == result[4];

    result[3] == decimal % 2;
    decimal == result[3];

    result[2] == decimal % 2;
    decimal == result[2];

    result[1] == decimal % 2;
    decimal == result[1];

    result[0] == decimal % 2;
    decimal == result[0];

    document.getElementById("resultCell").innerHTML = 
    result[9].toString() +
    result[8].toString() +
    result[7].toString() +
    result[6].toString() +
    result[5].toString() +
    result[4].toString() +
    result[3].toString() +
    result[2].toString() +
    result[1].toString() +
    result[0].toString();
}
    ```

```