Mode:
Duration:
1
2
3
4
5
6
7
# emscripten/demo/isOdd.c
#include <emscripten/emscripten.h>
EMSCRIPTEN_KEEPALIVE
int isOdd(int n) {
return (n % 2) != 0;
}Coding works best on desktop or with an external keyboard.
# emscripten/demo/isOdd.c
#include <emscripten/emscripten.h>
EMSCRIPTEN_KEEPALIVE
int isOdd(int n) {
return (n % 2) != 0;
}Coding works best on desktop or with an external keyboard.
Returns 1 if a number is odd, 0 otherwise.
# emscripten/demo/isOdd.c
#include <emscripten/emscripten.h>
EMSCRIPTEN_KEEPALIVE
int isOdd(int n) {
return (n % 2) != 0;
}Emscripten is an open-source compiler toolchain that compiles C and C++ code into WebAssembly (Wasm) or asm.js, allowing developers to run native code in web browsers at near-native speed.
Origin & Creator
Emscripten was originally developed by Alon Zakai in 2010 and is now maintained as an open-source project under the LLVM and WebAssembly ecosystems.
Industrial Note
Emscripten is ideal for developers porting legacy C/C++ applications to the web, including games, scientific simulations, multimedia apps, and performance-critical software.