What is the best way to add touch input in java script? | Sololearn: Learn to code for FREE!

0

What is the best way to add touch input in java script?

I have made a simple snake game

3/29/2019 1:59:12 AM

Aditya Mahakali

2 Answers

New Answer

+2

eventlistener ("click", functionhere)

+1

By declaring the parameter named event of the callback function to the event listener. The viewport coordinates are properties of the mouseEvent object : event.clientX and event.clientY https://code.sololearn.com/WDymn82FAiHB/?ref=app