And it's called a web browser. In a web browser you can inspect the elements of a page, there are dieter ways of doing it. Firefox: ctrl-u, Chrome/Chromium: right-click -> inspect element. Then you can play with the JS. read more
Those two things are unrelated to one another. Xcode is an Objective-C and Swift IDE, used primarily for iOS and MacOS development. It has no inherent JavaScript support, and while there may be some way to do iOS development in JS, it almost certainly requires a secondary piece of software to compile JS into one of the languages Xcode supports. read more
Apple’s Swift Playgrounds are a great way to learn coding, but there’s a huge gap between learning on the iPad and doing on a Mac. read more