removeAttribute导致未定义

这是我编写并停留的前几行Javascript。

    <div id=form_template2 style="border: 1px solid black"></div>

    <script>
        const form_template = document.getElementById('form_template2')
        console.log(form_template.removeAttribute("style"))
    </script>

一旦添加.removeAttribute('style')位,我就在console.log中变得未定义:/