Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Javascript Basics
const maxHealth = 100; var currentHealth = 50; var numberLives = 5; currentHealth = maxHealth; var characterName = "Wishmaster"; var currentLevel = 1; //var isGameOver = false; //print(isGameOver); // const (value that can't be changed, let (scope base), var //if (true) { //var isGameOver = false; //var and const can be access inside and outside of code blocks //let isGameOver = false; //} let message = "Hi, my name is " + characterName; //"Hi, my name is ${characterName}"; <-- Interpolation let length = characterName.length; let upperName = characterName.toUpperCase(); let lowerName = characterName.toLowerCase(); let wish = characterName.slice(0,4); let level = "Hello, your current on level " + currentLevel; print(message) print(wish) print(level)
run
|
edit
|
history
|
help
0
Add more strength to input color
Merge Two Arrays
fb_series
BinaryGap, javascript - Find longest sequence of zeros in binary representation of an integer.
🦆 you JS
Javascript is weird
Sonic 1 + Sonic & Knuckles/Blue Spheres - Code Validator
empty
isUniqueChar
replaceMethod