# Javascript Error: element.text is not a function

**URL:** <https://discourse.jupyter.org/t/javascript-error-element-text-is-not-a-function/20582>\
**Category:** Notebook\
**Tags:** how-to, help-wanted\
**Created:** [July 25, 2023, 1:03am UTC](https://discourse.jupyter.org/t/javascript-error-element-text-is-not-a-function/20582 "2023-07-25T01:03:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![slimUp](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@slimUp](https://discourse.jupyter.org/u/slimUp)\
**Post date:** [July 25, 2023, 1:03am UTC](https://discourse.jupyter.org/t/javascript-error-element-text-is-not-a-function/20582/1 "2023-07-25T01:03:09Z")

</div>

Hi there! I’m running into this error:

```auto
%%js
const a = 1;
const b = 2;
const c = a + b;
element.text(c);

Javascript Error: element.text is not a function

```

I saw a 2020 [identical topic](https://discourse.jupyter.org/t/jupyter-lab-notebook-javascript-error-element-text-is-not-a-function/6790) but no response back then…

hoping I’ll be luckier! thaaannnks 😉

---

<div class="post-metadata">

**Author:** ![jtp](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jtp/32/19100_2.png) [@jtp](https://discourse.jupyter.org/u/jtp)\
**Post date:** [July 25, 2023, 9:34am UTC](https://discourse.jupyter.org/t/javascript-error-element-text-is-not-a-function/20582/2 "2023-07-25T09:34:40Z")

</div>

@slimUp which Jupyter user interface are you using (JupyterLab / Notebook)? And which version?

---

<div class="post-metadata">

**Author:** ![slimUp](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@slimUp](https://discourse.jupyter.org/u/slimUp)\
**Post date:** [July 25, 2023, 11:01pm UTC](https://discourse.jupyter.org/t/javascript-error-element-text-is-not-a-function/20582/3 "2023-07-25T23:01:46Z")

</div>

hey @jtp thanks for helping me!  
I’m using Jupyter Notebook - Version: 7.0.0 👍  
with miniconda on linux

---

<div class="post-metadata">

**Author:** ![jtp](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jtp/32/19100_2.png) [@jtp](https://discourse.jupyter.org/u/jtp)\
**Post date:** [July 26, 2023, 7:14am UTC](https://discourse.jupyter.org/t/javascript-error-element-text-is-not-a-function/20582/4 "2023-07-26T07:14:58Z")

</div>

Looks like using `element.textContent = c` would work otherwise?

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/e/ecd82ac90f3e6f8e726028faed0f09f8e4254621.png)

---

<div class="post-metadata">

**Author:** ![slimUp](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@slimUp](https://discourse.jupyter.org/u/slimUp)\
**Post date:** [July 28, 2023, 12:57am UTC](https://discourse.jupyter.org/t/javascript-error-element-text-is-not-a-function/20582/5 "2023-07-28T00:57:29Z")

</div>

yes it does! Thank you so very much @jtp !
