I
It's possible, but it depends on the engine used for the game. SugarCube is the easiest to modify (at least as far as I am aware), and Harlowe is harder (I haven't been able to modify it using devtools, but then again, I did give up after a day).
For SugarCube, open console and type "SugarCube.State.variables." and depending on your options, a tray of objects for the game should present themselves to you. The options typically consist of variables, containers, and functions (in some cases). To edit, say a variable called "money" in "SugarCube.State.variables", you would typically enter "SugarCube.State.variables.money=x", where x would be the amount you want to change it too, which could also be an expression. Some variables are stored in containers (objects containing other objects), for example the stats of a player could all be in an object called "pc", in which case, to edit say the "strength" of the player, you would enter "SugarCube.State.variables.pc.strength=x" where again x is the amount you want to change it too.
For Harlowe, you would (as far as I am aware) have to use the save feature if one is available as I have not figured out how to do it through the console. Save the game to your local machine, then open the file at
https://www.saveeditonline.com/, or a similar editor. You can then change the variable values, download the new file, and load it from disk in the game. This is also applicable to SugarCube games if the save feature is enabled.
*Note: Sometimes "SugarCube" won't be loaded in console (I type "SugarCube" but nothing pops up in the tray). In those instances, I usually use the inspector and search in the html for "SugarCube" (the one you are looking for should be in a tag called "tw-storydata"). After that, I double click the name "SugarCube", and when I go back to console, it pops up, but closing dev tools would need you to do this again.