Skip to content

Tag: javascript

Why I cant assign new value for string in array?

In each word from string, every even indexed chars in each word should be upper cased. Example: “This is a sample” -> “ThIs Is A SaMpLe” I know that it’s not the best solution to solve this problem but I want to understand why the last assignment doesn’t work. Answer arr…

Picture is not visible

The picture is not visible on my HTML page. Image Path values are true. I didn’t get an error in the code part, but what is the problem? Answer You have to import your logo file first. Then you need to call the image using the img tag.

how to count clicks on an element other than a button?

I have an empty box in the footer section, which is situated in the div I would like to write a function in javascript that would count the number of clicks in the div, and display the number of clicks in the same div. I am wondering how to achieve this without touching the html. I have seen how to