OneBite.Dev - Coding blog in a bite size

🧑‍🚀 Blog for learning javascript

javascript blog posts, coding tips and trick in a bitesize to help you learn javascript.

Web scraping with javascript (Easy step by step)

Learn web scraping with JavaScript through this easy step-by-step guide, and start extracting data from websites effortlessly and efficiently!

javascript scraping

Auto expand textarea with Javascript as you type

Here is how you can expand or grow your textarea if the content is already more than current height while typing

javascript

Verify only 1 edit action required to string in Javascript

The problem is to check if two strings are one (or zero) edits away. A javascript sample solution for this common interview problem.

javascript

Check if a string is palindrome permutation in Javascript

. In a palindrome, characters have to appear in pairs for the string to be mirrored around the center, except possibly for one character. Here is the javascript solution

javascript

Check if two strings is anagram on javascript

Here is how to solve the interview question for Check if two strings is anagram on javascript

javascript

Determine if all string has unique characters in Javascript

Determine if a string has all unique characters, you can use a Set in JavaScript. See case sensitive and insensitive version.

javascript

Chunking array buy n number in javascript

The array chunking problem is another common interview question. The goal is to divide an array into smaller sub-arrays (chunks), where each chunk is of size n

javascript

fizz buzz program sample in javascript

The FizzBuzz problem is a classic coding interview question. Here is sample program and how to solve it

javascript

How to find the maximum character in a string in javascript

javascript

How to check if string is Palindrome in Javascript

Checking if a string is a palindrome (same when reversed) in javascript. Also handling white space chars.

javascript

Check array only contains unique value javascript

How to verify array is only contains unique value in Javascript. Answer is using Set!

javascript

Convert data from jsonb postgres to array Javascript

Here is how to Convert data from jsonb postgres to array Javascript

PostgreSQL javascript

Import function from another file in NodeJS without module

If you need to add an external function from other file into a nodejs file without changing the type into module type you can use this commonJS method

javascript nodejs

Dragging item on mobile also scrolling the parent

When working with dragging library like interactjs, I got a problem with mobile devices. Where scrolling get buggy and moving the parent as well

javascript

Async await function not working in forEach loop Javascript

This is a quick solve on how to handle async await function not working in forEach loop Javascript

javascript

How to make zoom effect in HTML with CSS

Learn how to make zoom effect in HTML with CSS. We will play with scale transformation on CSS to make the element chosen bigger/smaller

HTML CSS javascript

How to get x and y coordinate position when clicking on javascript

Learn How to get x and y coordinate position when firing on click event at javascript

javascript

How to use Toast UI Editor in Browser (without NPM)

Are you looking for great markdown WYSIWYG text editor? Try toast UI Editor, lets see how to use it directly in browser

toastUI javascript

Super simple Zoom image vanilla javascript medium like

I need an ability to zoom images on my site. Luckily I found this javascript plugin by Tholman that very easy to use.

javascript

Sort Javascript Object Value by the number or date

Do you need to sort your object by one of the key value by the number? start from highest or lowest number? We can use javascript sort function fort that. Here is how

javascript

Sort javascript Object value alphabetically

Do you need to sort your object by one of the key value alphabetically? We can use javascript sort function fort that. Here is how

javascript

Auto Scroll page in Javascript

Do you have a really long page that you wish will scroll down automatically using javascript? or do you want to make this as feature for your website visitor?

javascript

Convert string to UUID format in Javascript

This is how to convert a 32 characters string into UUID format with - dash as separator on each 8 - 4 - 4 - 4 - 12 characters.

javascript

Hover effect on 5 star rating systems

This is my solution on how to make a Hover effect on 5 star rating systems

javascript

Simple jquery like selector for vanilla javascript

jQuery make us love javascript. One of the simplest but most useful feature for me is the selector in jquery, just use $ dollar sign and target the element. Let's make it happen in our vanilla javascript

javascript

Working with object in localstorage

We all love localstorage, no database needed to store simple things for our user. But what if the data is more than a string or number? How to store and read object in localstorage?

javascript

How to add _blank or open new tab for link in markdown

Can we add _blank property or open new tab for our links in markdown? is there any way around it

markdown javascript

Debug javascript in iphone device

Learn how to debug javascript of your website in iphone device from your mac to see console result error or warning

debug javascript

How to add HTML content inside sweetalert box

Here is how you can add html content or html tag inside your sweetalert box

javascript

How to Draw Image in Html Canvas

Let's learn how to draw an image with HTML canvas. We'll see how to upload image and draw it or browse it on our machine's library

html javascript canvas

How to Create Dark Mode in Website

Learn how to create a dark mode website for your website. It's actually easier that you think

html css javascript

How to Draw Text in Html Canvas

Let's learn how to draw a text with HTML canvas

html javascript canvas

How to Create Poster With HTML Canvas

Learn how to make a poster with html canvas, in this example we will make a poster for making a quoter for instagram post

html javascript canvas