Skip to content

JS code test for Klarna

Notifications You must be signed in to change notification settings

EnzoMartin/klarna-code-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Klarna code test

Code tests done for Klarna as a JS evaluation test, total time: ~1h 30m

Test 1

Implement a credit card masker that replaces all but the 1st and last 4 digits in the provided sequence

Should not mask input shorter than 6 characters

Should not mask non-numeric characters

Test 2

Implement a number to ordinal method that returns a string

Input constraint is 0 to 10,000

Test 3

Implement a calculator that accepts an expression as a string and performs the calculations

Expressions should be evaluated such that a operation will operate on the previous 2 numbers

Assumption can be made that an expression provided will always be valid

Valid operations are + - / *

If no operations are provided, the last value in the expression should be returned

Should return 0 if no expression is provided

About

JS code test for Klarna

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages