# Superscript I’m AppLab

**URL:** <https://forum.code.org/t/superscript-i-m-applab/34433>\
**Category:** Coding and Debugging Help\
**Created:** [March 21, 2021, 10:41pm UTC](https://forum.code.org/t/superscript-i-m-applab/34433 "2021-03-21T22:41:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lcescocancian](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@lcescocancian](https://forum.code.org/u/lcescocancian)\
**Post date:** [March 21, 2021, 10:41pm UTC](https://forum.code.org/t/superscript-i-m-applab/34433/1 "2021-03-21T22:41:31Z")

</div>

I am trying to make an app for my students to practice factoring polynomials but I’m struggling to get an x squared to show up properly formatted. How can I make a label contain a superscript?

**Link to the project or level:** [Code.org - App Lab](https://studio.code.org/projects/applab/1QCeo2CScaDKlMIADbYyFdpOIyhEKdMB0Mxx9ZxH4_E)

**What I expect to happen:** I want to be able to write a variable with an exponent (superscript)

**What actually happens:** I can’t format the text in any way besides color,size,etc.

---

<div class="post-metadata">

**Author:** ![mwood](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mwood/32/4941_2.png) [@mwood](https://forum.code.org/u/mwood)\
**Post date:** [March 21, 2021, 10:59pm UTC](https://forum.code.org/t/superscript-i-m-applab/34433/2 "2021-03-21T22:59:03Z")

</div>

@lcescocancian

Good question! I searched on google how to type a superscript 2 in javascript and found the following javascript function… 178 is the char code for the superscript 2, so this should work!

`String.fromCharCode(178)`

Mike

---

<div class="post-metadata">

**Author:** ![lcescocancian](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@lcescocancian](https://forum.code.org/u/lcescocancian)\
**Post date:** [March 22, 2021, 1:50am UTC](https://forum.code.org/t/superscript-i-m-applab/34433/3 "2021-03-22T01:50:07Z")

</div>

That’s it!! thank you so much!
