Skip to content

Tag: javascript

(JS/CANVAS/HTML) – isPoinToPath inaccurate?

Below here, the provided snippet for testing purpose. The yellow(y) represent the canvas area, return “n” on click The red(r) represent the click area, return “y” on click The trouble(x) represent the error, return “y” when clicked How to make it right? Answer You have a mi…

Have checked countless times and can’t figure out where my error is: Uncaught TypeError: Cannot read properties of undefined (reading ‘lat’)

I’ve been playing around with the OpenWeatherMap API to learn to code and have run into a series of TypeError issues popping up in my console. My assumption is that my program is attempting to use data from the API before it is finished fetching, but I have set the fetch functions up to wait until recei…

How to fetch data properly for this API? (array)

console.log screenshot Hi, I am using “fetch” method with API for my website, and this API shows book information, if books include the input title. Screenshot attached is console.log result when typing an example book title. I’d like to get every title info of each array, could anyone can h…

Vue3 app on vite can’t compile scss syntax

I can’t use scss nesting syntax. _table.scss table { &.table { width: 100%; } } results in dev tools I imported my _table.scss file into main.scss and main.scss into main.js main.scss main.js Here is my package.json dependencies And my vite.config.js I followed the vite API If I use simple syntax .b…