Teaching Newbies since 2014

kauress

  • Home
  • Javascript ❤
    • JavaScript
    • Node.js
  • WebDev Tuts
  • screencasts
  • Resources
  • VR & AR
  • Contact
  • Github
  • Twitter
  • YouTube
  • RSS
  • C++
You are here: Home / Archives for Javascript ❤ / JavaScript

August 12, 2019 by: Kauress

Conditionally rendering EJS template with res.locals in express.js

This snippet is to conditionally render navbar items based on whether a user is logged in OR not.  So toggle the ‘Login’ button to ‘Logout’ if the user is already logged in and vice versa. I admit it took more time that I had anticipated. Primarily because in the beginning I insisted on using a global variable in express to manage the user’s ‘isAuthenticated’  state

[ Read More ]

June 26, 2019 by: Kauress

Plug and Play Authentication for express.js

  What started out as a small module has become a month long project. Some days I sleep well, other days I keep a notebook besides me to jot down ideas. I’ll be putting this project up on Product Hunt and Gumtree as a stand alone module for other  developers to use. Version 1.0 has the following features: User can make an account using their

[ Read More ]

June 23, 2019 by: Kauress

JWT: What are JSON Web Tokens & use cases

Same old web..new drama.. What are JSON Web Tokens? [JWT]? JWT are tokens that you can use in your web application to transfer data over a network and therefore authenticate communication between 2 parties. A better definition is: JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties. – Source It is a hash like encrypted string

[ Read More ]

June 17, 2019 by: Kauress

New project: Authentication from scratch

New project in progress… Vanilla JS project with: 3 Login strategies 2 password reset strategies Security precautions

[ Read More ]

May 4, 2019 by: Kauress

Coding Worksheet # 5: OMG! Objects

OMG! Objects What are objects Objects are a data type. JavaScript follows an ‘object based paradigm’. Which means in JS an object is a stand-alone entity (object) with properties. Properties come in key: value pairs. They are like variables. In the sense that variables reference some value in memory. The same way, in objects the property key: value pairs are akin to variables. Why? Think

[ Read More ]

April 29, 2019 by: Kauress

Newbie guide : socket.IO: Code a chat app – Part 2

Code a chat app Guide Introduction The features of the chat app Socket.IO methods Socket.IO events Callback functions Directory structure So far.. Set up index.html and style.css Sending a message from the client to the server Receiving the message from the client at the server Displaying the message to all connected clients Broadcasting “user is typing…” message Display greeting message when someone joins the chat

[ Read More ]

April 27, 2019 by: Kauress

Coding worksheet #4: Callback functions

Just something I made as a primer. I’ve tried to condense as much information I could for ‘scoped’ learning [codepen_embed height=”300″ theme_id=”21517″ slug_hash=”ZRjGxr” default_tab=”html,result” user=”Kauress”]See the Pen You used to callback on my cellphone, code worksheet by Kauress (@Kauress) on CodePen.[/codepen_embed]

[ Read More ]

January 15, 2019 by: Kauress

Day 5: JavaScript function to crash your browser

JavaScript function to crash your browser via an infinite loop [codepen_embed height=”300″ theme_id=”21518″ slug_hash=”bOJBee” default_tab=”js,result” user=”Kauress”]See the Pen <a href=’https://codepen.io/Kauress/pen/bOJBee/’>Day 5: JavaScript function to crash browser</a> by Kauress (<a href=’https://codepen.io/Kauress’>@Kauress</a>) on <a href=’https://codepen.io’>CodePen</a>.[/codepen_embed]

[ Read More ]

January 14, 2019 by: Kauress

Day 4: Neural network in JavaScript with brain.js

Work in progress on codepen…  

[ Read More ]

January 13, 2019 by: Kauress

Day 3: Anonymous JavaScript function

Anonymous functions: “Anonymous functions are created at runtime. The function operator can be used anywhere that it’s valid to use an expression. For example you can use the function operator when a variable is being assigned, when a parameter is being passed to a function or in a return statement.”  more @helephant [codepen_embed height=”411″ theme_id=”21518″ slug_hash=”MZzNZB” default_tab=”html,result” user=”Kauress”]See the Pen <a href=’https://codepen.io/Kauress/pen/MZzNZB/’>Day 3: Anonymous JavaScript

[ Read More ]
  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page »

Copyright © 2021 ·Kauress