Store object to localStorage Code Snippet

The code defines two functions, addToStorage() and viewStorage(), that interact with the localStorage object in the browser. The addToStorage() function retrieves the values entered in two form fields using the getElementById() method, and creates an object called myObj with these values as properties. It then logs this object to the console using console.log(). Next, the … Read more

jQuery Code Sample to request Data AJAX

$(document).ready(function() { $.getJSON(‘/users’, function(data) { console.log(data); }); $(‘.btn’).click(function() { var user = $(‘input[name=”user”]’).val(); var pass = $(‘input[name=”pass”]’).val(); $.post(‘/users’, $(‘#myform’).serialize()) .done(function(data) { console.log(data); }); }); }); This code will make a GET request to /users endpoint when the page is loaded, and make a POST request to the same endpoint when the button with class btn … Read more

Responsive Navigation Bar Source Code HTML CSS and JavaScript

This is a basic HTML, CSS, and JavaScript code for creating a responsive navigation bar. In the HTML code, there is a header with a navigation bar that contains a logo, a menu toggle button, and a menu. The logo is wrapped in a div with a class of “logo”, and the menu is an … Read more

Starter Web Template

basic template you can use as a starting point: HTML: <!DOCTYPE html> <html> <head> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <title>My Responsive Website</title> <link rel=”stylesheet” href=”style.css”> </head> <body> <header> <!– Add your header content here –> </header> <main> <!– Add your main content here –> </main> <footer> <!– Add your footer content here –> </footer> … Read more

New Registry Code.mov new website for Laurence Svekis

Find out more about my new website for coding and learning to code https://blog.google/products/registry/8-new-top-level-domains-for-dads-grads-tech/ Laurence Svekis is an experienced web application developer, instructor, and entrepreneur with over 25 years of experience in the field of web development. He is known for his expertise in various web development technologies and his passion for sharing his knowledge … Read more

Fun Workspace Addons Free Games in Docs

Free Fun Addons in Google Workspace Create a Math Quiz in Docs https://sites.google.com/view/math-quiz-addon/home Math Quiz Addon Simple Add on to Generate Random Math Questions within you Google Docs.  You select the number of questions, the values of the numbers and the operators you want in the questions.   Magically creates Math questions for you.  Best … Read more

Top 10 Tips to write better JavaScript Code

Using == instead of ===Not using const and letNot using semicolonsNot handling errorsNot using strict modeNot using curly bracesNot using Array.prototype.forEach()Not using const when defining functionsNot using the let keyword in for loopsNot using === or !== with null or undefined Using == instead of === Using == instead of === can lead to unexpected … Read more

Top 10 coding mistakes with JavaScript and how to avoid them

top 10 coding mistakes with JavaScript and how to avoid them:  #javascript #learnjavascript #javascripttutorial #javascriptbeginner #javascriptintermediate #javascriptadvanced #javascripttips #javascripttricks #javascriptcode #javascriptproblems #javascriptchallenges #javascriptdom #javascriptajax #javascriptjquery #javascriptnode #javascriptreact #javascriptangular 1. Not declaring variables. When a variable is not declared, it is considered a global variable. This means that it can be accessed from anywhere in the … Read more

Google Apps Script Video Lessons Source Code

Add Columns with Apps Script Sort By Column Index value Filter the rows in a Google Sheet Create a pivot table in a Google Sheets Create a new Google Slides presentation Add Columns with Apps Script function addColumn() {   const ss = SpreadsheetApp.getActiveSpreadsheet();   const sheet = ss.getSheets()[0];   const sheetName = sheet.getName();   sheet.insertColumnBefore(1);   const lastCol = … Read more