single quote / grave accent

In trying to follow the ‘lunch calculator’ tutorial (Tutorial 1: Lunch calculator / Observable / Observable), I found that I couldn’t type the correct single quotation mark needed for:

viewof sandwiches = html`<input type=range />`

I copied the character and google it, and found that what I needed to type was a grave accent ( ` ), not a single quote ( ’ ), but I can’t find any info on how to make this character without having to do a complicated keyboard input. This seems to be such a common character in this environment, that I find it hard to believe everyone goes through this process. I realize this is probably a Windows issue and not an Observable issue, but I’m sure others on this forum have already figured out this seemingly dumb problem.

Any tips for how I can get this to work?

Hi!
I am curious what keyboard you are using. Many keyboards have this character under the Esc key (see classic keyboard picture below). This character is used quite extensively in JavaScript for string template literals (Template literals (Template strings) - JavaScript | MDN).

1 Like

Geez, yes, you’re correct. I’m just getting into Javascript from Python, so I’m just used to regular single quotes working, and this just had me flummoxed

For record, I’m on a Dell laptop, its just a button I’ve never needed to use before and somehow glossed over.

Thanks a bunch! Appreciate the non-judgmental feedback!

1 Like

Hi, @d-ho-215. The template literals with backticks work like the f-strings in python it’s very convenient!

1 Like