Skip to content

Instantly share code, notes, and snippets.

View harshvats2000's full-sized avatar
🏠
Working from home

HARSH VATS harshvats2000

🏠
Working from home
View GitHub Profile
@harshvats2000
harshvats2000 / linkedList.js
Created October 20, 2021 09:49
Linked List and it's methods implementations using class in JavaScript
// SINGLY LINKED LIST
class SinglyLinkedList {
constructor(head = null) {
this.head = head;
}
getFirstNode() {
return this.head;
}
document.addEventListener('DOMContentLoaded', function () {
var lazyloadImages = document.querySelectorAll('img.lazy');
var lazyloadThrottleTimeout;
function lazyload() {
if (lazyloadThrottleTimeout) {
clearTimeout(lazyloadThrottleTimeout);
}
lazyloadThrottleTimeout = setTimeout(function () {