- To ignore remote changes and overwrite them
git push origin --force
- The token conveyor belt: use hidden input fields to pass ‘info’ between POST & GET requests (if there is no user entered info into an input field which can be ‘gotten’ through req.body).
Use case: in script.js assign the value of an element’s “innerHTML” property to be the value of a hidden input. This is useful if the innerHTML property’s value is dynamic and depends on some prior user action:
<input type="hidden" name="amount value ="" id="checkoutinput>
var checkoutinput = document.getElementById("checkoutinput");
checkoutinput.value = cart.grandTotal.toFixed(2);
Join 7000+ other code newbies
Last year 7000 newbies learned how to code with me! Totally project oriented.
Subscribe and you'll get access to my classes, coupon codes for tech conferences and totally valuable article on jump-starting your career as a developer.