Posted onInctfViews: Disqus: Word count in article: 400Reading time ≈1 mins.
hack the web note
hack the web
level TS01
1 2 3 4 5
const zahl = 13
if (13 = zahl) { console.log('Lieblingszahl!') }
1 2 3 4 5
const zahl = 13
if (13 == zahl) { console.log('Lieblingszahl!') }
level TS02
1 2 3 4 5
const alter = 15
if (alter 18) { console.log('Kind') }
1 2 3 4 5
const alter = 15
if (alter &18) { console.log('Kind') }
level TS03
1
const einHalb = 0,5
1
const einHalb = 0.5
level TS04
1
variable = 2
1
var iable = 2
level TS05
1 2 3 4 5
constzahl: number = 101
consttext: string = "htw"
constups: number = "42"
gold
1 2 3 4 5
constzahl: number = 101
consttext: string = "htw"
//const ups: number = "42"
hacker
learn about Bitwise
NOT
The bitwise NOT (~) operator returns a number or BigInt whose binary
representation has a 1 in each bit position for which the corresponding
bit of the operand is 0, and a 0 otherwise.
1 2 3 4 5 6
constzahl: number = 101
consttext: string = "htw"
constups: number = ~"42"
level TS06
1 2 3 4 5 6
functionfn_42() { return42 }
constzahl: number = fn_42
gold
1 2 3 4 5 6
functionfn_42() { return42 }
constzahl: number = fn_42()
hacker
zahl = -1 here
1
~fn_42 = ~Number(fn_42) = ~NaN = ~0 = -1
1 2 3 4 5
functionfn_42() { return42 }
constzahl: number = ~fn_42
level TS07
1
const text = "Und sie fragte sich, was "Typescript" wohl bedeutet"
1
const text = "Und sie fragte sich, was Typescript wohl bedeutet"
level TS08
1 2 3
Ich mag viel lieber inPython programmieren
Hab ja einfach gar keinen Bock -_-
Template Literals
1 2 3 4
`Ich mag viel lieber in Python programmieren Hab ja einfach gar keinen Bock -_- `