straversi / Typer.js

Typing effect completely configurable in HTML.
http://steven.codes/typerjs
MIT License
135 stars 23 forks source link

How to write variable. #17

Closed Ilovemyhous closed 1 year ago

Ilovemyhous commented 2 years ago

Hello! It's not a real issue, but more like a "please help me" situation.

I'm trying to code some sort of terminal where the user is prompted for the name, but I don't know how to print the variable.

<h2>
        <!--Code for the text-->
        <span class="typer" id="recovery_mode"
        data-words="Booting into recovery mode...,Computer: Who... who are you?,Computer: Hello..."+name+"..."
        data-delay="100"
        data-colors="red, gray, gray"
        data-loop="1"></span>

        <!--Code for the cursor-->
        <span class="cursor"
        data-owner="main"></span>
    </h2>
   name = prompt("Who are you?")

I know, this repository hasn't been getting issues for quite some time, but I'll give it a shot.