Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
JavaScript snippets by Aurelien Dotpro
Style console log messages
JavaScript
0
4
1176
Remove last chracter of a string
JavaScript
0
1
887
Detect Browser language
JavaScript
0
1
1017
generate random HEX color
JavaScript
0
0
805
Edit the text of any DOM element from viewport
JavaScript
0
0
815
ES6 Array
JavaScript
0
0
814
JS Scroll Event
JavaScript
0
0
855
Basic Arrow Function
JavaScript
0
0
812
Better console.log()
JavaScript
0
0
699
Delete branch locally
JavaScript
0
0
725
Check if a string is within a string (indexOf)
JavaScript
0
0
739
Intersection Observer basic example
JavaScript
0
0
588
Element appear via Intersection Observer
JavaScript
0
1
590
Detect iPhone model (from 1st gen to XS Max)
JavaScript
0
0
655
Dad Joke API exemple
JavaScript
0
0
557
Ternary variable delcaration
JavaScript
0
0
468
Mutation Observer simple example
JavaScript
0
0
546
Simple Local Store implementation
JavaScript
0
0
549
Mutation Observer on class change
JavaScript
0
0
1317
regex number
JavaScript
0
0
590